
EDuke32 Scripting "CON coding help"
#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
#830 Posted 03 June 2012 - 01:55 AM
I am very "new" to eDuke32 and I do have a few questions.
1. I would like to change inventory icons for items without altering the .ART file. These tiles are reserved, so I can't redefine them via defs.con. So I thought of inven_icon thing. But how does it actually work?
2. Is it possible to make totally new sprite/actor switch operable? Like I push the button with proper tags and my actor does a new action...
3. How to redefine the position of HUD view of tripbomb without changing the .ART file?
That's all for now. I did a lot of things myself, but I am stuck with these. Thanks in advance.
#831 Posted 03 June 2012 - 06:55 AM
2) Yes. You'd get it done using these: http://wiki.eduke32....erateactivators | http://wiki.eduke32....emasterswitches | http://wiki.eduke32....Operaterespawns | http://wiki.eduke32..../Operatesectors
3) You'd have to go into EVENT_DISPLAYWEAPON, cancel drawing if the tripbomb is being used, and then redraw it yourself (using rotatesprite, or myospal). There's an example included with EDuke32 showing how you'd re-display the weapons via CON.
#832 Posted 03 June 2012 - 07:41 AM
3) Use my weapons.con.sample, included in the samples directory with EDuke32. Include it from your cons and it will override the weapon display code in the exe with exact ports to CON. From there, you can modify positioning. If you want to move both the tripbomb and the hands down as a unit, increase the value of "addvar hud_y 10" at the start of "state draw_tripbomb". Moving it up will require some subtraction.
#833 Posted 07 June 2012 - 03:59 AM
I use tilefromtexture 2461 { "pic.bmp" 0 } and it says bullshit about syntax errors and expecting keywords. Ok, I'll be honest. I modify erampage stuff, so is it possible it doesn't work there...