
EDuke32 Scripting "CON coding help"
#2004 Posted 30 June 2017 - 11:45 AM
#2005 Posted 01 July 2017 - 10:04 AM
I have chosen to add tiles for the closing animation in the model instead of using backward animation in the script.
I'm posting it in case someone else would be interested by the script. Here's the feedback :
action OPENING 1 8 1 1 0 action CLOSING 10 8 1 1 0 useractor notenemy OPERABLE_DOOR1 ifaction 0 ifpdistl 1800 ifcansee ifhitspace { soundonce 450 action OPENING cstat 0 } ifactioncount 30 ifaction OPENING ifpdistl 1800 ifcansee ifhitspace { soundonce 455 action CLOSING cstat 1 } ifactioncount 30 ifaction CLOSING ifpdistl 1800 ifcansee ifhitspace { soundonce 450 action OPENING cstat 0 } enda
Thank you guys.
This post has been edited by David B.: 01 July 2017 - 11:21 AM
#2006 Posted 25 July 2017 - 11:24 AM
Is it possible to control a point light (SE49) with a script ? I need a way to light up a room with real light source, when a switch is used.
#2007 Posted 25 July 2017 - 11:42 AM
This post has been edited by Mark.: 25 July 2017 - 11:44 AM
#2009 Posted 01 August 2017 - 07:58 AM
How to control a SE (SE12 in my case for controlling the lighting of a room) with a custom light switch model ? (I know how to do for activators but I haven't found nothing for SE).
In fact I need a model because it must also execute other stuffs like change the picnum of the wall-light model (5439 to 5440, the last being defined with a glow map when the room is bright).
eventloadactor SWITCH getactor[THISACTOR].lotag SPRITE_LOTAG // = SECTOR EFFECTOR CHANNEL setactor[THISACTOR].lotag 0 enda useractor notenemy SWITCH [...] ifvare MODE 1 ifhitspace ifcansee { // MODE 1 being conditions like facing it, being close to it, ... don't worry. operatemasterswitches SPRITE_LOTAG // Is there a right command for what I want ? // OR : operateactivators SPRITE_LOTAG 0 // doesn't work neither as SE is not an activator of course;) } enda
-Subsidiary issue : is it possible to activate a glow map on a model directly by a script instead of defining two wall-light models and switching their picnum ?
This post has been edited by David B.: 01 August 2017 - 07:59 AM
#2010 Posted 01 August 2017 - 09:59 AM
This post has been edited by Mark.: 01 August 2017 - 10:01 AM
#2011 Posted 01 August 2017 - 11:24 AM
Mark., on 01 August 2017 - 09:59 AM, said:
#2012 Posted 01 August 2017 - 11:57 AM
This post has been edited by Mark.: 01 August 2017 - 11:59 AM
#2013 Posted 02 August 2017 - 12:59 AM
Mark., on 01 August 2017 - 11:57 AM, said:
#2014 Posted 03 August 2017 - 01:37 PM
David B., on 02 August 2017 - 12:59 AM, said:
You need to use spritenoshade on the lamp model tile number, then code the lamp to switch between normal shade value and full bright shade (-127) depending on whether it is "lit".
#2015 Posted 03 August 2017 - 02:19 PM
This post has been edited by Mark.: 03 August 2017 - 02:22 PM
#2016 Posted 03 August 2017 - 02:25 PM
#2017 Posted 04 August 2017 - 06:09 AM
Even after placing some SE49 or 50 in the model, the lamp is not bright enough when it's "on", so I need to define a glow map and maybe working with two models, one has the glow, the other not.
But Confetti work with original switches from duke nukem and I don't know how they are hardcoded so to control the SE12.
Also I tried to add a script to the LIGHTSWITCH2 but this make it disappear from the game.
This was the script I started :
useractor notenemy LIGHTSWITCH2 ifp pfacing ifcansee ifhitspace ifpdistl 512 { getactor[THISACTOR].pal SIGNAL_ON } enda
My idea was getting the pal number of the switch and use it as a channel, and furtherly link it to the lamp with the same matching pal number (so the engine finds the right model in the map and changes its picnum when the global variable SIGNAL_ON is greater than zero).
That was the point.
This post has been edited by David B.: 04 August 2017 - 06:21 AM
#2018 Posted 04 August 2017 - 06:13 AM
Drek, on 03 August 2017 - 02:25 PM, said:
This post has been edited by David B.: 04 August 2017 - 06:21 AM
#2019 Posted 04 August 2017 - 11:04 AM
something like:
ifvarl sector[THISACTOR].floorshade 10 spritepal 3 else spritepal 0
Basically this would just detect if the sector is at a certain shade level (say under 10) and then change the sprite's skin to your lit version. You can of course change the 10 to whatever value you set the lit sector to. If this works and you want a more flexible version of the code, just ask again and I can whip something up for you.
#2020 Posted 05 August 2017 - 02:19 AM
Jblade, on 04 August 2017 - 11:04 AM, said:
something like:
ifvarl sector[THISACTOR].floorshade 10 spritepal 3 else spritepal 0
Basically this would just detect if the sector is at a certain shade level (say under 10) and then change the sprite's skin to your lit version. You can of course change the 10 to whatever value you set the lit sector to. If this works and you want a more flexible version of the code, just ask again and I can whip something up for you.
#2021 Posted 19 August 2017 - 10:37 AM
It comes after the final clips when u finish an EP etc.
How do we remove dis and ore replace it?

This post has been edited by Zaxtor: 19 August 2017 - 10:37 AM
#2022 Posted 19 August 2017 - 11:15 AM
Zaxtor, on 19 August 2017 - 10:37 AM, said:
I'm not sure, but it might be the NODUKETEAMTEXT bit on the predefined LOGO_FLAGS gamevar. You can declare it with a different value and see what happens.
http://wiki.eduke32....wiki/LOGO_FLAGS
Specifically, include this line in your var declarations:
gamevar LOGO_FLAGS 524544 0
#2023 Posted 19 August 2017 - 11:49 AM
if I put "gamevar LOGO_FLAGS 524544 0 " it disables all clips.
if I do
gamevar NODUKETEAMTEXT 524288 0
and
gamevar NODUKETEAMTEXT 524544 0
it wont work
#2024 Posted 19 August 2017 - 02:34 PM
#2025 Posted 19 August 2017 - 03:07 PM
Cus EP4 accepts "level placements without warping you to wrong level when you hit nuke button after going through 3 secret levels etc, (sector you walk in to finish level etc).
Dunno if they fixed it on Duke's today standard.
I remember in Oblivion level placements on EP1 were "weird" to have more levels than the EP1 limit.
This post has been edited by Zaxtor: 19 August 2017 - 03:08 PM
#2027 Posted 19 August 2017 - 06:19 PM
Got rid of it.
Had to remove the musicname.voc to get rid of the duke music when was dark screen but music still present.
#2029 Posted 19 August 2017 - 09:43 PM
Hendricks266, on 19 August 2017 - 04:56 PM, said:
255 (the default) plus 524288.
Oops I had added 256 instead of 255.
#2030 Posted 21 August 2017 - 04:39 AM
Was gonna pic the arctic still pic, didn't work but scrapped it.
Ending is pretty long tho so is ok.
#2031 Posted 25 August 2017 - 07:21 PM
it says (except the ability to look up/down with the mouse)
is there a locking code to temporarily lock mouse movements too?
#2032 Posted 26 August 2017 - 04:33 AM
"you should setplayer[THISACTOR].weapon_pos 1 and also setplayer[THISACTOR].jumping_counter 0
and maybe setinput[].horz 0 maybe even setinput[].bits 0
should keep the player from doing anything when lockplayer is active
firing a gun or jumping
looking up and down
etc"
#2033 Posted 26 August 2017 - 01:24 PM
i tried with horz and bits (inside player) no workin
like setinput[THISACTOR].horz 0
and other so nothing happens
This post has been edited by Zaxtor: 26 August 2017 - 01:24 PM