
EDuke32 Scripting "CON coding help"
#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.
#811 Posted 02 May 2012 - 11:43 PM
onevent EVENT_ANIMATESPRITES ifactor BUTCHER { settspr[THISACTOR].tsprang 512 } endevent action ABUTCHERWALK 0 4 5 1 20 ai AIBUTCHERWALK ABUTCHERWALK BUTCHERWALK useractor enemy BUTCHER getactor[THISACTOR].mdflags tmp orvar tmp 16 setactor[THISACTOR].mdflags tmp ifai NO { sizeat 24 24 cstat 257 ai AIBUTCHERWALK } .... .... bla bla bla ... ... enda
But enemy still directed towards the player, why?
This post has been edited by M210: 02 May 2012 - 11:44 PM
#812 Posted 03 May 2012 - 02:41 AM
#813 Posted 03 May 2012 - 03:00 AM
To understand what I want to make a better look at this video
As you can see the angle of the enemy is not related to the angle of direction. So I made sure that the enemy doesn't turn away rapidly from the wall, but the animation turns out wrong, and the enemy begins like to walk backwards
This post has been edited by M210: 03 May 2012 - 03:04 AM
#816 Posted 03 May 2012 - 04:14 AM
This post has been edited by M210: 03 May 2012 - 04:14 AM
#817 Posted 05 May 2012 - 12:01 PM
#818 Posted 06 May 2012 - 05:32 AM
#819 Posted 06 May 2012 - 01:15 PM
Diaz, on 06 May 2012 - 05:32 AM, said:
True, it seems to implement a light SE spawner which sets the spawned SE's statnum to STAT_EFFECTOR. I went ahead and made the change because the benefits outweigh everything else IMO. r2646 should be of interest to CON coders messing with lights.
#820 Posted 06 May 2012 - 07:32 PM
#822 Posted 15 May 2012 - 01:42 AM
The pistol was supposed to play the firing sound plus a distinctive sound when only 5 shots were remaining in the clip. I did this by playing a sound on EVENT_DOFIRE when conditions were met. Now when there are 5 bullets left, that distinctive sound plays, but the pistol firing sound doesn't, and ammo is not substracted during these 5 shots.
This post has been edited by Diaz: 15 May 2012 - 01:44 AM
#823 Posted 15 May 2012 - 05:28 AM
#824 Posted 15 May 2012 - 06:25 AM
#826 Posted 15 May 2012 - 10:16 AM
Anyways, got it fixed by using EVENT_FIRE instead and changing the code slightly.
This post has been edited by Diaz: 15 May 2012 - 10:35 AM
#827 Posted 15 May 2012 - 12:13 PM
I recommend you to use the code in the APLAYER code itself, and check if kickback_pic equals WEAPONX_FIREDELAY.
#828 Posted 15 May 2012 - 09:51 PM
#829 Posted 16 May 2012 - 10:39 AM
For example at EVENT_WEAPKEY7 doesn't works setvar RETURN -1, therefore I received an unwanted ability to switch weapons (shrinker/expander )
This problem I got in rev2656
This post has been edited by M210: 16 May 2012 - 10:43 AM