Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   shoot in gs2 (https://forums.graalonline.com/forums/showthread.php?t=63256)

Prozac 01-06-2006 07:07 PM

shoot in gs2
 
In code that is otherwise gs2, I find myself needing to have one line of code in gs1 becasuse the gs2 formatting causes shoot to not work.

What I have: (this.angle is set with getangle from the vecs of the playerdir)
PHP Code:

  shoot playerx,playery,playerz-1,this.angle,.3,2.5,sc_arrow1,sc_arrow1

and that works fine. the gani shows correctly in the projectile.

what the wiki says on http://wiki.graal.us/GScript under old to new conversions:

Quote:

Originally Posted by wiki
shoot float, float, float, float, float, float, oldstring, oldstring;
shoot(float,float,float,float,float,float,string,s tring);

so I tried it:

PHP Code:

  shoot(playerx,playery,playerz-1,this.angle,.3,2.5,sc_arrow1,sc_arrow1); 

and it makes the gani of the projectile become just the oval shadow.
as the old newfeatures file which addresses shoot says it may do.

I know that the last variable is supposed to be the gani attribute,
but there is no gani attribute that I need to change.
All I want to do it show the gani as-is.

Even setting the last attribute to arrow - which is what i called the arrow sprites when i made the gani - it still just shows the gani.

Taking off the last variable in gs2 causes the projectile to not show up at all.

I just want one arrow frame for the correct direction to show, so i do not need setshootparams.

I tried a forums search and the only possibly useful thread had the code that would have been helpful to me deleted by lance, in this thread
http://forums.graalonline.com/forums...ighlight=shoot

so ... what broke in gs2 here?
or, what am I doing wrong? Basically, what would an example ganiparams look like? I have use every resource (forums search, wiki, newfeatures) and cannot find what i need to know to make this work in gs.
Please have mercy and help me!!!

Skyld 01-06-2006 07:09 PM

Strings in gscript2 need to be surrounded by "quotemarks".
PHP Code:

shoot(player.xplayer.yplayer.1this.angle0.32.5"sc_arrow1""parameter here"); 


Prozac 01-06-2006 07:12 PM

(thank you skyld ... grabs a crayon and writes on my brain)

If you want a string in gs2 .. put it in "quotes"
and it makes it all better ...

btw skyld i am looking forward to Rudora. nice menu gui you got there so far.

Skyld 01-06-2006 07:44 PM

Quote:

Originally Posted by Prozac
(thank you skyld ... grabs a crayon and writes on my brain)

You're welcome.
Quote:

btw skyld i am looking forward to Rudora. nice menu gui you got there so far.
Thank you.


All times are GMT +2. The time now is 09:47 PM.

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