Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
zzzornbringer

custom actor a_setshootable question

Recommended Posts

i've created a custom actor to replace the hanging victim decoration sprite and make it shootable.

i got this to work but the actor physically reacts to bullets as well, as in, it gets pushed back.

the actor looks like this:

actor hangingvictim 
{
Game Doom
Radius 16
Height 64

+SOLID
+SPAWNCEILING
+NOGRAVITY

States
{
Spawn:
gor3 A 0 a_setshootable
gor3 A -1
Stop
}
}
i tried some different things (adding mass etc.) but it still moves when i shoot it. if i set the a_setshootable flag for dead monsters, the corpses don't move, so i don't understand why it won't work for this actor.

hope you can help me. thanks.

Share this post


Link to post

Check the Romero Head's DECORATE, perhaps? After all, you can shoot Romero all you want, that spike ain't goin' anywhere.

That or Keen. He's similarly static.

Share this post


Link to post

Give it Mass 0x7FFFFFFF and it shouldn't move.

Share this post


Link to post

thanks, should have thought about romeros head.

however, i have figured it out finally. you have to make the actor a monster and give it 0 health, so it's dead when it's spawned. if it's dead, it doesn't move.

here's the code:

actor zhangingvictim 
{
Game Doom
Radius 16
Height 64
DeathHeight 64
health 0
monster
+SPAWNCEILING 
+nogravity 

States
{
Spawn:
goto death

death:
gor3 A -1 a_setshootable
stop
}
}
even if you "goto death" in the spawn state and have 1 health, it still moves when you shoot it the first time.

edit: romeros head (bossbrain) uses a high amount of mass (10000000). i tried this as well but the actor would still move very very slightly. :)

Share this post


Link to post

Alternative solution: Place another, invisible, indestructible actor on the same position. Movement of both will be blocked then, like when a monster is stuck inside a decorative object. The other blocking actor should have SOLID flag set, but not SHOOTABLE.

EDIT: Also remember that "goto Death" will not actually kill the monster. That's what A_Die function is for.

Share this post


Link to post
scifista42 said:

EDIT: Also remember that "goto Death" will not actually kill the monster. That's what A_Die function is for.


thanks, changed this.

also, as it turns out, when you shoot the actor with a rocket, it still moves. so, i changed the mass to the same value romeros head has and it stays even if you shoot rockets at it.

Share this post


Link to post
zzzornbringer said:

edit: romeros head (bossbrain) uses a high amount of mass (10000000). i tried this as well but the actor would still move very very slightly. :)

Gez said:

Give it Mass 0x7FFFFFFF and it shouldn't move.


0x7FFFFFFF is the maximum possible value. 2 147 483 647 vs 10 000 000.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×