
EDuke32 Scripting "CON coding help"
#744 Posted 02 March 2012 - 04:43 AM
operateactivators, operatemasterswitches, operaterespawns, operatesectors, activatebysector doesn't works for it. How to do this?
#745 Posted 02 March 2012 - 05:16 AM
M210, on 02 March 2012 - 04:43 AM, said:
Yeah, none of those commands will work because the lightswitch doesn't work with activators or sector tags (etc.) it all happens within the SE. That being said, you'd have to find some way to alter the SE to make it jive with checkactivatormotion or something like that. I don't mess around with SE's or really any of those actors so I can't help with that. If I were you, I'd just make a new actor that uses checkactivatormotion, then changes the floorshade of the sector it's in to a certain parameter defined in its hitag (or some other struct member like that) if the activator in motion equals a certain other struct member (lotag, extra, etc.)
And as long as I'm mentioning checkactivatormotion, is there some other sort of command I'm not aware of that checks the motion of a sector itself? I created an actor some time ago that would play two different, specific sounds for when a door opened and closed (like in Doom), but ATM it's using checkactivatormotion to keep tabs of when the door's actually opening and when it's closing, ergo every door that uses this actor HAS to be operated by a switch. I'd kind of like for it to also work with regular doors that you can open with the spacebar, but I can't find any command or check that would help with that.
#746 Posted 02 March 2012 - 05:42 AM

#747 Posted 02 March 2012 - 05:47 AM
that's very easy to get via bullets like this
getactor[THISACTOR].picnum picnum ifvare picnum SHOTSPARK1 { getactor[THISACTOR].htg_t 6 tmp ifvare tmp -1 { getactor[THISACTOR].htg_t 7 sectorid getactor[THISACTOR].z sector_z1 getsector[sectorid].ceilingz sector_z2 ifvarvare sector_z2 sector_z1 { } } }
but I can't to make such code for projectiles...
because projectiles can damage ceilings even if it get into the wall
This post has been edited by M210: 02 March 2012 - 05:51 AM
#748 Posted 03 March 2012 - 02:07 AM
And about mapster32 scripts. I got a one idea when I saw savegamevar
Maybe make those command for mapster32? Save a variable and value to file in m32 than call variable in the game?
#749 Posted 12 March 2012 - 07:52 AM
I've made an actor that is supposed to trigger activators whose lotag match the actor's hitag when it's killed (it's a monster). The code works fine bacause it prints out the debugging quote I've added, but it's not triggering the activators. Even if I set it to operate activators defined by a fixed number (just in case I'm not parsing the hitag correctly), it won't work.
getplayer[THISACTOR].i TEMP checkactivatormotion HITAG ifvarn RETURN 1 { quote 100 operateactivators HITAG TEMP }
This code is executed on the ifdead... section of the actor's ifhitweapon code.
This post has been edited by Diaz: 12 March 2012 - 08:01 AM
#750 Posted 12 March 2012 - 08:01 AM
#751 Posted 12 March 2012 - 08:55 AM
#752 Posted 12 March 2012 - 01:41 PM
Diaz, on 12 March 2012 - 08:55 AM, said:
Well it's important insofar as players that don't exist can't activate shit.

#753 Posted 12 March 2012 - 02:07 PM

#754 Posted 18 March 2012 - 07:00 AM
Thanks for helping me out

#755 Posted 18 March 2012 - 08:46 AM
320x240 = 4:3
Duke actually uses 320x200 which is 16:10. Then it does some weird crap and stretches that to fit in various 4:3 resolutions.
So first start there, make your graphic the correct 320x200 resolution and that will "fill the screen" on a 4:3 res. Then in rotatesprite (or myospal or whatever) set your orientation to 1024. Note that this will distort the image, but it WILL cover the screen.
Setting widescreen has no effect on graphics that weren't displayed with orientation 1024 set.
#756 Posted 18 March 2012 - 09:44 AM

#757 Posted 25 March 2012 - 04:46 AM
Is it possible to make it so enemies (hardcoded and useractor enemy) do NOT light themselves up when firing projectiles?
Right now I'm making them notenemy but ofcourse there are some drawbacks, like autoaim not working on them...
#758 Posted 25 March 2012 - 06:28 AM
Diaz, on 25 March 2012 - 04:46 AM, said:
Is it possible to make it so enemies (hardcoded and useractor enemy) do NOT light themselves up when firing projectiles?
Right now I'm making them notenemy but ofcourse there are some drawbacks, like autoaim not working on them...
For the polymer lights Htflags should theoretically do it.
Also... I'm not sure how not being able to autoaim at enemies is a drawback
#759 Posted 25 March 2012 - 06:35 AM
#760 Posted 25 March 2012 - 06:45 AM
James, on 25 March 2012 - 06:35 AM, said:
Shooting a projectile doesn't light anything up though (at least if it's notenemy). The exception to this is polymer, because things like SHOTSPARK1 are coded to cause a light to spawn.
#761 Posted 25 March 2012 - 06:53 AM
Mblackwell, on 25 March 2012 - 06:45 AM, said:
Yeah an enemy actor does become fullbright if they're firing a shotspark weapon, I thought that was what he meant.
#762 Posted 25 March 2012 - 06:53 AM
#763 Posted 25 March 2012 - 07:05 AM
Plagman, on 25 March 2012 - 06:53 AM, said:
Setting the shade manually would be the only way to do it then afaik.
#764 Posted 25 March 2012 - 07:25 AM
This post has been edited by Diaz: 25 March 2012 - 07:26 AM
#765 Posted 25 March 2012 - 08:18 AM
Diaz, on 25 March 2012 - 07:25 AM, said:
Are these enemies you are having the problem with on the regular enemy tile numbers (like PIGCOP, LIZMAN, etc.)?
#766 Posted 25 March 2012 - 01:31 PM
Some enemies are regular tile numbers, and others are useractors. Behavior seems to be the same.
By the way, setting the shade of the sprite to current sector's floorshade in the actor code doesn't seem to work (I guess the hardcoded shading is applied after my code so it has no effect)
EDIT: Nevermind, setting the shade in EVENT_GAME does work. Marvelous!

This post has been edited by Diaz: 25 March 2012 - 01:38 PM
#767 Posted 27 March 2012 - 09:13 AM
onevent EVENT_DISPLAYREST .... setvarvar temp ydim divvar temp 5 mulvar temp 524288 divvarvar temp xdim setaspect 32768 temp // or setaspect 32768 78644 // being 78644 the right value for 4:3 ... for my 5:4 screen it's 83866 but it doesn't change anything. endevent
What is wrong ?
This post has been edited by RichardStorm: 27 March 2012 - 11:13 AM
#768 Posted 27 March 2012 - 09:29 AM
#770 Posted 27 March 2012 - 09:32 AM
#771 Posted 27 March 2012 - 11:14 AM
Quote
Hell yeah! It works... tks
#772 Posted 28 March 2012 - 07:21 PM
marcolino123, on 27 March 2012 - 09:31 AM, said:
This command is useful in other display events as well if you want to stretch things shown via rotatesprite and similar commands. For instance, setaspect 32768 65536 removes the unwanted vertical stretching what is crucial for proper rotation.
#773 Posted 28 March 2012 - 07:28 PM
CraigFatman, on 28 March 2012 - 07:21 PM, said:
That's good to know. I HATE that vertical stretching; it has ruined so many graphics for me. But does that work in all renderers?