![]() |
Shoot to GS2?
Is there any specific method that shoot is to be done in GS2? I used the same shoot and setshootparams in GS1, but I'm unsure how to do it in GS2.
This is what I have. NPC Code:function shoot() I'm guessing there's a problem in there because it worked fine in GS1, and it's setting the players gani animation as well as taking the bullet away but the bullets arent shooting. Any helpful advice/tips (NB: Tryial and ApothiX - read bolded part twice to make sure you understand. That means don't ***** at each other in this thread.) are appreciated. Edit: Oh, I found it useful removing the quotations from the gani name, heh heh heh. On another note - is there a GS2 version of shoot? If so, what is it (If someone would be so kind as to tell me.) |
x-x things like
shoot whateverwhateverwhatever will not work on GS2.. because its not GS2 its, shoot(param,param,param,etc) setshootparams(params) Do you understand? setani aniname,param; is now setani("aniname","param1"); also, shoot is a reserved function so do something like function DoShoot() in addition.. just a side note: use player.x not playerx (playerx is GS1) etc that way you are accessing the player in object form not GS1 form. :) i strongly suggest checking out the bible/wiki for more information.. go to the GScript section and look up starters guide (or on the wiki, just look at the main Gscript page) there are links to function lists.. the (2) next to the Clientside functions is a simple dump of all the functions.. no weirdness like the Bible used to have.. I like having just a big CTL+F searchable list of functions.. if i need something to do with files then I just search the document as i would on google.. with simple keywords.. ie: file would bring up like findfile() deletefile() etc... anyways.. good luck.. dont be afraid to post even if people are jerks because its the best way to learn.. also check out the #gscript IRC chat: irc.freenode.net/#gscript |
Well it works ;)
So would that said script become NPC Code:function shoot() I'm still sort of converting from GS1 to GS2, heh. |
Yes, but again dont forget that its setani("aniname","param1"); not setani ani,param;
mixing them causes lack of effeciency in scripts.. things streamline much better in GS2 also.. i saw in the other thread that you were having problems with the string being a variable maybe put (just to make sure its always an integer) client.whatever = int(client.whatever-1); |
Ooh so its setani("millenium_cx-fire","");
I'm assuming it's also replaceani("idle","millenium_cx-idle"); Oh, and that variable string problem in the other thread was sorted. It was a scripting error I had made earlier in the script, which checked NPC Code: instead of NPC Code: |
Quote:
Quote:
|
Quote:
It would make client.whatever into - 0 if.. lets say.. somehow it got turned into clientr.whatever == "foo"; |
Quote:
client.whatever++; Would probably change client.whatever to 1, anyway. |
Quote:
I am not sure about that.. but doing int() makes sure that it will not happen. :) |
Quote:
But thanks for your help. :) |
| All times are GMT +2. The time now is 11:09 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.