EDuke32 Scripting "CON coding help"
#781 Posted 04 April 2012 - 04:37 AM
#782 Posted 04 April 2012 - 09:00 AM
#784 Posted 12 April 2012 - 04:05 AM
I'm using this code to simulate jetpack flames, but it doesn't wait between the spawning of the flames.
After half a second, the game crashes showing the 'too many sprites spawned' message.
onevent EVENT_GAME ifp pjetpack { ifcount 2 { espawn EXPLOSION2 setactor[RETURN].xrepeat 16 setactor[RETURN].yrepeat 16 resetcount } } endevent
I have the feeling I'm doing something wrong.
Any ideas?
This post has been edited by Superthijs: 12 April 2012 - 04:10 AM
#785 Posted 12 April 2012 - 05:21 AM
#786 Posted 12 April 2012 - 05:30 AM
This post has been edited by rasmus thorup: 12 April 2012 - 05:31 AM
#788 Posted 12 April 2012 - 09:00 AM
How do I make an actor shoot a projectile with another vertical angle? I've managed to make it shoot towards where the player is looking at,
but it keeps shooting at the same vertical angle. Even when the player looks up or down.
#790 Posted 12 April 2012 - 03:47 PM
Superthijs, on 12 April 2012 - 09:00 AM, said:
How do I make an actor shoot a projectile with another vertical angle? I've managed to make it shoot towards where the player is looking at,
but it keeps shooting at the same vertical angle. Even when the player looks up or down.
In addition to what Hendricks said, if you know your target:
http://wiki.eduke32....or_aim_vertical
#791 Posted 13 April 2012 - 08:45 AM
#792 Posted 13 April 2012 - 08:58 AM
#793 Posted 13 April 2012 - 10:16 AM
#794 Posted 14 April 2012 - 02:32 AM
#796 Posted 14 April 2012 - 07:29 AM
rasmus thorup, on 13 April 2012 - 10:16 AM, said:
Yeah, I think that's what I need. But how do I convert the 'horiz' number to a slope value, e.g. 4096?
#797 Posted 14 April 2012 - 07:42 AM
#798 Posted 14 April 2012 - 09:58 AM
Superthijs, on 14 April 2012 - 07:29 AM, said:
Subtract 100, multiply with 32 (= 4096/128).
#799 Posted 15 April 2012 - 01:06 PM
getflorzofslope sectnum x y z getsector[sect2].floorz z2 subvarvar z z2 divvar z 2 setsector[sect2].floorslope z
And this code works slowly with the formation of gap. Any ideas for fix it?
Second question - How can I get a level name and show this on display?
This post has been edited by M210: 15 April 2012 - 01:07 PM
#801 Posted 15 April 2012 - 10:37 PM
M210, on 15 April 2012 - 01:06 PM, said:
qgetsysstr
#802 Posted 15 April 2012 - 11:06 PM
Fox, on 15 April 2012 - 10:31 PM, said:
It get floor slope (like floor vertical angle) to a given value of z coordinate.
If z coordinate is changing by moving sector, my code no time to determine the exact position and the gap is obtained.
Hendricks266, on 15 April 2012 - 10:37 PM, said:
Thanks a lot
This post has been edited by M210: 15 April 2012 - 11:07 PM
#803 Posted 19 April 2012 - 10:45 AM
Quote
It's not a read-only value! And I not want to set statnum = 14 manually. What can I do else?
#804 Posted 19 April 2012 - 01:30 PM
#806 Posted 24 April 2012 - 02:06 AM
I want add a sprite with differect x y z coordinats, picnum and other bits in mapster32 via script.
I don't understand how works insertsprite command and I think it's not what I need
#807 Posted 24 April 2012 - 07:09 AM
M210, on 24 April 2012 - 02:06 AM, said:
It probably is what you want, but it's not documented and I have never used it. But it should be possible to insertsprite and then set it to have the coords and other things you need.
#808 Posted 24 April 2012 - 07:21 AM
M210, on 24 April 2012 - 02:06 AM, said:
I want add a sprite with differect x y z coordinats, picnum and other bits in mapster32 via script.
I don't understand how works insertsprite command and I think it's not what I need
For some reason I marked insertsprite as "deprecated/do not use", so I guess I wanted people to use dupsprite instead. It will clone the sprite with the given spritenum and set the current sprite to the newly inserted sprite. Movements should then be done with bsetsprite and attribute changes with "set .xxx yyy". The a.m32 script contains an example that constructs a round or linear staircase from one stair part and a pivot sprite.
#809 Posted 24 April 2012 - 09:57 AM
Can dupsprite command insert a nullsprite (picnum = 0) with xvel,yvel,zvel = 0?
It's very important to have a zero all the bits in new sprit
This post has been edited by M210: 24 April 2012 - 10:00 AM
#810 Posted 24 April 2012 - 10:37 AM
Btw, the reason I discourage insersprite is that the member values are indeterminate after insertion, since the only thing it does is to allocate a new spritenum from the list.