Thing_Hate and SetActorProperty

Archive of the old editing forum
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.
Locked
User avatar
The Ultimate DooMer
Posts: 2109
Joined: Tue Jul 15, 2003 5:29 pm
Location: Industrial Zone

Thing_Hate and SetActorProperty

Post by The Ultimate DooMer »

Given that the phorums are no longer there (so I can't search), can someone tell me what the Thing_Hate args are?

Also, is there a SetActorProperty for invulnerability? (Heresiarch style)

Finally, what is the speed value of the player for APROP_Speed? (I know about the getactorproperty thing, but I'd like to know the actual value)
User avatar
Kate
... in rememberance ...
Posts: 2975
Joined: Tue Jul 15, 2003 8:06 pm

Post by Kate »

The Ultimate DooMer wrote:Given that the phorums are no longer there (so I can't search), can someone tell me what the Thing_Hate args are?
Here's what I know:
Thing_Hate(HaterTID[0 for activator], HatedTID[0 for activator], Type);

Type can be one of these:
0 or no third parameter - Normal monster behaviour

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, but will go after monsters without seeing 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
The Ultimate DooMer wrote:Also, is there a SetActorProperty for invulnerability? (Heresiarch style)
I don't think there is a property for that, although there are SetReflectiveInvulnerable and UnSetReflectiveInvulnerable code pointers.
The Ultimate DooMer wrote:Finally, what is the speed value of the player for APROP_Speed? (I know about the getactorproperty thing, but I'd like to know the actual value)
The actual player-movement value is 65536, so 32768 = half speed, 131072 = double speed, etc.

PS: There IS a reason I'm important...
Last edited by Kate on Thu Oct 04, 2007 5:20 pm, edited 1 time in total.
User avatar
bimshwel
Posts: 704
Joined: Tue Jul 15, 2003 5:15 pm
Location: misplaced
Contact:

Post by bimshwel »

You must be, very much so, if you've been "Here. 24 hours a day 7 days a week" when the f'rum opened less time ago than that.
User avatar
Kate
... in rememberance ...
Posts: 2975
Joined: Tue Jul 15, 2003 8:06 pm

Post by Kate »

That just means I'm always here, and you can always find me here no matter what time of day it is.

PS: I can't think of another reason why I'd be important... I can't code and I can't make a playable level(although I have tried countless times). Oh well.
Cyb
Posts: 912
Joined: Tue Jul 15, 2003 5:12 pm

Post by Cyb »

you can output the speeds/etc of stuff to the screen to check them as well

print(d:getactorproperty(0, aprop_speed), d:getactorproperty(12, aprop_health));

etc etc, just a quicker way to lookup stuff like that without having to wait for an answer on the forums

edit: oh and you can make stuff invulnerable with a script as follows:

Code: Select all

int health = getactorproperty(9, aprop_health);

script 100 OPEN {
   if(getactorproperty(9, aprop_health) < health)
      setactorproperty(9, aprop_health, health);
   delay(1);
   restart;
}
they can still be killed with really powerful weapons that knock out all their health in one shot (or with mdk) but it serves the purpose. also you could just set their health to something insanely high like a couple million, though there's probably a limit of 65535 since actor health is probably stored in a short integer (2 bytes), but don't quote me on that

edit: actually glancing at the script it needs a check in case the monster does die so it won't keep adding health to a corpse, but I suppose you could just terminate the script when he dies via his thing special
Locked

Return to “Editing (Archive)”