i was just thinking about if (actionprojectile) {}, and is there any way to distinguish between 2 different projectiles?
thinking in java (which i know some of you hate) you can use e.getsource which tells you what the source is.
anyway to do that in gScript?
You can make projectiles shoot params,which in turn could be used to distinguish between 2 projectiles if you add a check.
Nope,no examples.
shot1:
setshootparams 1;
shoot playerx+vecx(playerdir)*2,playery+vecy(playerdir)*2,playerz,getangle(vecx(playerdir),vecy(playerdir)),0,0,gani,;
shot2:
setshootparams 1;
shoot playerx+vecx(playerdir)*2,playery+vecy(playerdir)*2,playerz,getangle(vecx(playerdir),vecy(playerdir)),0,0,gani,;
telling the difference:
if (actionprojectile)message #p(0);
wouldn’t you need to have setshootparams 2; … not 1 again?
yes its suppose to be 2. Sorry bout that, im half sleepy and my eyes and jaw hurt a shit load. Not a good day today so soz about that mistake
yes. you could also insert words. or things like #a.
[QUOTE=Onijustin;52270]yes. you could also insert words. or things like #a.[/QUOTE]
#a isn’t a word…
Words or things like #a. He did not specify that #a was a word.
[QUOTE=gllt;52272]Words or things like #a. He did not specify that #a was a word.[/QUOTE]
isn’t #a a variable?
or am i confusing myself?
#a is a string, it represents the account name of the player who triggers it, I suggest you go read commands.rtf and newfeatures. They are your greatest companion in your quest to learn gscript.
#L=levelname
#a=account name
#n=nick name
#8=current body
#3=current head
etc…
and for future reference if you want to check any of these strings
if (strequals(#a,tricxta))destroy;
if its a number how ever use strtofloat(string to floating point)
if (strtofloat(#s(client.number))==10000000000)message oh shit thats too much!;
im not that stupid, i’ve read commands.rtf and newfeatures200x multiple times…
I just got my strings and variables confused.
You asked, they gave you the answer. Get hostile, we will flame you. :whatever:
[QUOTE=Yenairo;52290]You asked, they gave you the answer. Get hostile, we will flame you. :whatever:[/QUOTE]
i know, i didn’t mean to sound like it.
someone wanna close the thread before it gets that way?
lets keep it open and see what happens :eek: