
ThingHate & ScriptedMarine Tutorial/Editing Specs?
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
ThingHate & ScriptedMarine Tutorial/Editing Specs?
I'm looking for "ThingHate & ScriptedMarine Tutorial/Editing Specs", something which explains me very detailed, how they work 

OK, not a full blown tutorial, just something I copied off the old forum
Thing_Hate (tid of who is hating, tid of who is hated, hate type);
Thing_Hate (1, 2, 6);
makes monsters with tid 1 hate monsters of tid 2, will ignore player attacks and will go after hated monsters without seeing them first.
Thing_Hate (tid of who is hating, tid of who is hated, hate type);
egRandy wrote:I just got done enhancing Thing_Hate with a third parameter you can set like this:
0. Same behavior as before.
1. Monsters work like normal, except instead of looking for players, they look for monsters with the TID they're supposed to hate. They won't go after a monster unless they can see it first. After finishing off one monster, they look for more with the same TID. If they can't find any, they go back to sleep. They will ignore you unless you attack them, in which case they will target you like normal.
2. Same as 1, except they will chase after other monsters without needing to see them first.
3 - Hunt actors with given TID and also players
4 - Same as 3, but will go after monsters without seeing them first
5 - Hate actors with given TID and ignore player attacks
6 - Same as 5, but will go after enemies without seeing them first
Thing_Hate (1, 2, 6);
makes monsters with tid 1 hate monsters of tid 2, will ignore player attacks and will go after hated monsters without seeing them first.
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
More copying and pasting coming up. This is more info from the old board. Marines are basically just monsters that can be added using the edit numbers listed below. To make them behave unlike a normal monster, use the thing hate stuff as above. I'm pretty sure a feature or two has been added to what can be done with the marines, but the stuff below covers most it. (One thing I know that has been added is the ability to change a monster/marine's skin via ACS but I can't find my notes on that ATM).
Randy wrote:Okay, here is what I have for 2.0.38:
Marine thing types:
9100 Marine w/ Nothing
9101 Marine w/ Fist
9102 Marine w/ Berserk Fist
9103 Marine w/ Chainsaw
9104 Marine w/ Pistol
9105 Marine w/ Shotgun
9106 Marine w/ Super Shotgun
9107 Marine w/ Chaingun
9108 Marine w/ Rocket Launcher
9109 Marine w/ Plasma Rifle
9110 Marine w/ Railgun
9111 Marine w/ BFG 9000
To change the marine's weapon, get ACC 1.27 and use the SetMarineWeapon command:
SetMarineWeapon (tid, weapon);
Substitute one of the following for weapon:
MARINEWEAPON_Dummy
MARINEWEAPON_Fist
MARINEWEAPON_BerserkFist
MARINEWEAPON_Chainsaw
MARINEWEAPON_Pistol
MARINEWEAPON_Shotgun
MARINEWEAPON_SuperShotgun
MARINEWEAPON_Chaingun
MARINEWEAPON_RocketLauncher
MARINEWEAPON_PlasmaRifle
MARINEWEAPON_Railgun
MARINEWEAPON_BFG
If you want a marine with a rocket launcher, you might also find this helpful:
SetActorProperty (tid, APROP_Health, new-health);
The marine's spawn health is only 100, they have no armor, and they have no sense to not fire when close to something. So if you get a marine with a rocket launcher in close quarters, he's almost sure to die unless you give him more health.
Check the zdefs.acs that comes with ACC 1.27 for other APROP_ values you can use. There's also a GetActorProperty (tid, property) command you can use to find out an actor's current value for a property.
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
- LilWhiteMouse
- Posts: 2270
- Joined: Tue Jul 15, 2003 7:00 pm
- Location: Maine, US
- Contact:
Dunno if this is useful to you, creating a fake skin for use with the scripted marines:
Code: Select all
Okay, here is what you can do with 2.0.39 and ACC 1.28. Create a dummy thing with DECORATE to load the sprite:
SpriteXYZZ
{
Sprite XYZZ
Frames "A"
}
Then to make a marine use the sprite XYZZ instead of PLAY, use this command in a script:
SetMarineSprite (marine-tid, "SpriteXYZZ");
Note that you specify the name of the actor you created in DECORATE and not the sprite.
- Tormentor667
- Posts: 13556
- Joined: Wed Jul 16, 2003 3:52 am
- Preferred Pronouns: He/Him
- Operating System Version (Optional): Windows 11
- Graphics Processor: nVidia (Modern GZDoom)
- Location: Germany
- Contact:
- Hirogen2
- Posts: 2033
- Joined: Sat Jul 19, 2003 6:15 am
- Operating System Version (Optional): Tumbleweed x64
- Graphics Processor: Intel with Vulkan/Metal Support
- Location: Central Germany
- Contact:
Cool, does this also work with the player itself to change the skin on-the-fly? What will be the fire frames, since Decorate doesnot have a FiringSprite/FiringFrames part?LilWhiteMouse wrote:Code: Select all
SetMarineSprite (marine-tid, "DecorateName");
- LilWhiteMouse
- Posts: 2270
- Joined: Tue Jul 15, 2003 7:00 pm
- Location: Maine, US
- Contact:
No, it doesn't work with the player. The frames are the same as the PLAY sprites. The decorate entry just tells ZDoom to use a different suffix, and gives it a name to use with the special.Hirogen2 wrote:Cool, does this also work with the player itself to change the skin on-the-fly? What will be the fire frames, since Decorate doesnot have a FiringSprite/FiringFrames part?
If you have one of my later Hellspawn demos that's how the former SSG marine was done. It's just a normal SSG scripted marine with a skin.
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
Tormentor667 wrote:So, it is eventually possible to create enemies using the super-shotgun, the bfg, the plasma rifle, the chaingun, the chainsaw and the berserk pack*amazing*
Thx for this
With one little restriction: They aren't counted as kills. But that shouldn't keep anyone from using this feature

- The Ultimate DooMer
- Posts: 2109
- Joined: Tue Jul 15, 2003 5:29 pm
- Location: Industrial Zone
well there is a way around that. what you do is make all the marines execute a script (or special) that kills some monster in a sector (actually they don't even need to be in a sector, but then you can place a sector silencer and make sure their death sounds aren't heard, or you could set their death sounds to DSEMPTY via acs) closed off from the rest of the map that they player can't get to. that way it seems like the marines count as kills. not overly pretty I suppose, but it gets the job doneGraf Zahl wrote: With one little restriction: They aren't counted as kills. But that shouldn't keep anyone from using this feature :wink:
- Graf Zahl
- Lead GZDoom+Raze Developer
- Posts: 49252
- Joined: Sat Jul 19, 2003 10:19 am
- Location: Germany
What a lousy hack!Cyb wrote:well there is a way around that. what you do is make all the marines execute a script (or special) that kills some monster in a sector (actually they don't even need to be in a sector, but then you can place a sector silencer and make sure their death sounds aren't heard, or you could set their death sounds to DSEMPTY via acs) closed off from the rest of the map that they player can't get to. that way it seems like the marines count as kills. not overly pretty I suppose, but it gets the job doneGraf Zahl wrote: With one little restriction: They aren't counted as kills. But that shouldn't keep anyone from using this feature

Heh, before Randy made it so that any monster that gets spawned into the game got added to the total monster value for the level, I used to have a bunch of enemies placed in the level that I removed with thing_remove on level startup (which removes, rather than kills them - so their removal isn't added to the kills %).
I had one removed enemy for every monster that was going to get spawned during play. That way you would never get over 100% kills because of killing monsters that weren't there at level startup.
Now that was a lousy hack.
I had one removed enemy for every monster that was going to get spawned during play. That way you would never get over 100% kills because of killing monsters that weren't there at level startup.
Now that was a lousy hack.
