Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sig-ma

Two Questions about Decorate

Recommended Posts

Hi,

I was hoping someone could help me with two issues that seemingly are very simple but the wiki is a little ambiguous and I wasn't able to resolve them in a fashion I liked.

The first revolves around monster movement. What I did was create a new Revenant (basically I simply want the normal Revenant to move slower):

ACTOR SlowRevenant : Revenant replaces Revenant
{
Speed 8
States
{
Spawn:
SKEL AB 4 A_Look
Loop
See:
SKEL AABBCCDDEEFF 4 A_Chase
Loop
}
}

This seems to work fine until I shoot the Revenant or it enters its pain state for whatever reason, then it seems to revert to the normal Revenants speed (A_Chase value becomes 2). Do I need to redefine all of the new Revenants states even though all I'd like to change is how fast it moves?

The second question essentially deals with the same idea but this time with a weapon. Suppose all I want to do is slow down the Plasma rifles rate of fire but otherwise, keep it exactly the same. If a player were to type in the idka cheat, the slower shooting plasma rifle is the one they'd be given. How do I go about doing this?

I've tried inheritance, as well as redefining it entirely (while using the PlasmaRifle replaces PlasmaRifle line) but it is unselectable.

Thanks in advance.

Share this post


Link to post

You're shortening the duration of the chase frames. While this is one way of making the monster faster, the more appropriate way is to change the speed (listed as 8 in your example).

The problem here, is that the pain state of the original definition skips to the original chase state. So if I understand correctly (I'm usually a DeHackEd person), you'd have to modify the pain and resurrect states to point to the new chase state, so that none of it's original states jumps back to the old one. I hope that's not confusing. So yes, you'd have to redefine some more states.

Share this post


Link to post
Sig-ma said:

This seems to work fine until I shoot the Revenant or it enters its pain state for whatever reason, then it seems to revert to the normal Revenants speed (A_Chase value becomes 2). Do I need to redefine all of the new Revenants states even though all I'd like to change is how fast it moves?

You'll need to redefine all the states that end with "Goto See". Gotos are static, they're evaluated at compile time. The engine doesn't remember them as "goto the actor's See state" but as "goto state number whatever". That means that if you inherit an actor's Pain state, which ends with a Goto See, that will always go to the original actor's See state.

(This is different from A_Jump codepointers, which are evaluated when run.)

Sig-ma said:

The second question essentially deals with the same idea but this time with a weapon. Suppose all I want to do is slow down the Plasma rifles rate of fire but otherwise, keep it exactly the same. If a player were to type in the idka cheat, the slower shooting plasma rifle is the one they'd be given. How do I go about doing this?

I've tried inheritance, as well as redefining it entirely (while using the PlasmaRifle replaces PlasmaRifle line) but it is unselectable.

You'll need to change the weapon slots.


If those are all the changes you want to make, it might be more convenient to change the state durations in dehacked, so that you don't have to worry about weapon slots, inheritance, and the reasons why they do what they do.

Share this post


Link to post

Adding only the "goto see" lines worked. I was able to remove some redundant lines from the new Revenant. Thanks.

EDIT: I figured it all out. Thanks!

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
×