Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-10-2007, 08:02 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
gani params + player.attr[]

Well, this is what I am doing

PHP Code:
//#CLIENTSIDE
funciton onCreated()
{
  
player.attr10] = "";
  
player.attr10] = "chompy_float-text.gani,+12";

This is what I do to show the gani, now..

In the gani script I am using emitter to show some text at the players position, but it won't recieve params[ 0] (which should be +12)...
so the emitter is suppose to show +12 as text, but it doesn't show anything at all..

Anyone know what's not working?
__________________
Reply With Quote
  #2  
Old 02-10-2007, 08:54 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Hmm, I got it to work, by using two attrs, BUT!

When I use emitters (emitter.particle.text) in the gani script, then only the client can see it, the text :[

Which is quite annoying..
__________________
Reply With Quote
  #3  
Old 02-10-2007, 11:12 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by Chompy View Post
Hmm, I got it to work, by using two attrs, BUT!

When I use emitters (emitter.particle.text) in the gani script, then only the client can see it, the text :[

Which is quite annoying..
Is the text itsself assigned to an attr?
__________________
Reply With Quote
  #4  
Old 02-11-2007, 12:27 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by Kristi View Post
Is the text itsself assigned to an attr?
I did

PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
player.attr10] = "";
  
player.attr10] = "chompy_float-text.gani";
  
player.attr11] = "";
  
player.attr11] = "+12";

When I do that, only I can see the '+12' text, and no others.. quite annoying
__________________
Reply With Quote
  #5  
Old 02-11-2007, 12:29 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Chompy View Post
I did

PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
player.attr10] = "";
  
player.attr10] = "chompy_float-text.gani";
  
player.attr11] = "";
  
player.attr11] = "+12";

When I do that, only I can see the '+12' text, and no others.. quite annoying
Uhm, why are you making the attributes blank before assigning a value..?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #6  
Old 02-11-2007, 01:04 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by xXziroXx View Post
Uhm, why are you making the attributes blank before assigning a value..?
>_>

I know I don't need it for the attr 11, but I have to make it blank before assigning it to a gani..
__________________
Reply With Quote
  #7  
Old 02-11-2007, 01:45 AM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by Chompy View Post
I did

PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
player.attr10] = "";
  
player.attr10] = "chompy_float-text.gani";
  
player.attr11] = "";
  
player.attr11] = "+12";

When I do that, only I can see the '+12' text, and no others.. quite annoying
may i see the code in the gani?
__________________
Reply With Quote
  #8  
Old 02-11-2007, 02:15 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
PHP Code:
SCRIPT
function onCreated()
{
  
thiso.text player.attr11];
  
withfindimg20))
  {
    
attachtoowner true;
    
layer 2;
    
player.random( -0.5, -1);
    
player.random( -1, -0.1);

    
emitter.continueafterdestroy true;
    
emitter.nrofparticles 1;
    
emitter.emitautomatically false;

    
emitter.particle.lifetime 0.75;
    
emitter.particle.text thiso.text;
    
emitter.particle.mode 1;
    
    
emitter.particle.red 0;
    
emitter.particle.blue 0;
    
emitter.particle.green 1;
    
    
emitter.particle.style "b";
    
emitter.particle.alpha 1;
    
emitter.particle.zoom 0.95;

    
emitter.particle.angle pi 2;
    
emitter.particle.speed 1;

    
emitter.addlocalmodifier"range"0.3750.875"alpha""replace"10);
    
emitter.addlocalmodifier"range"0.10.75"speed""replace"42);
    
    
emitter.emit();
  }

SCRIPTEND 
__________________
Reply With Quote
  #9  
Old 02-11-2007, 10:30 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
HTML Code:
SCRIPT
function onPlayerEnters()
{
  temp.messageText = player.attr[11];
  with(findimg(10))
  {
    attachtoowner = true;
    layer = 2;
    x = player.x - random( -0.5, -1);
    y = player.y - random( -1, -0.1);

    with (emitter)
    {
      continueafterdestroy = true;
      nrofparticles = 1;
      emitautomatically = false;

      with (particle)
      {
        lifetime = 0.75;
        text = temp.messageText;
        mode = 1;
    
        red = 0;
        blue = 0;
        green = 1;
    
        style = "b";
        alpha = 1;
        zoom = 0.95;

        particle.angle = pi / 2;
        particle.speed = 1;
      }

      addlocalmodifier("range", 0.375, 0.875, "alpha", "replace", 1, 0);
      addlocalmodifier("range", 0.1, 0.75, "speed", "replace", 4, 2);
      emit();
    }
  }
} 
SCRIPTEND
Should work
Reply With Quote
  #10  
Old 02-13-2007, 07:29 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Thanks I made some small modifications and it now works perfectly
Thanks Kristi! Rep ++;
__________________
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 12:48 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.