Moving Monsters without changing state.

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
mallo
Posts: 1112
Joined: Sat May 22, 2010 12:49 pm

Moving Monsters without changing state.

Post by mallo »

What letters in state are allowed? (MEEN A 4)
Beacuse i created this monstrosity:

Code: Select all

MeenSpeen:
LOAD "ABCDEFGHIJKLMNOPQRSTUVWXYZ[];<>,?!{}\|@#$%^&*(" 4
Goto See
And this shows me this error:
Script error, "dinner~1.wad:DECORATE" line 97:
Invalid frame character string 'ABCDEFGHIJKLMNOPQRSTUVWXYZ[];<>,?!{}\|@#$%^&*('
There's nothing about it on wiki (And about using letters like [ or ;, i had to look in zdoom.pk3 for this)
Last edited by mallo on Thu Feb 28, 2013 7:07 am, edited 1 time in total.
User avatar
Popsoap
Posts: 43
Joined: Wed Jun 30, 2010 1:18 pm

Re: DECORATE sprite letter

Post by Popsoap »

All letters from A-Z are allowed. "[", "\", and "]" are also valid provided they are enclosed in quotation marks.
mallo
Posts: 1112
Joined: Sat May 22, 2010 12:49 pm

Re: DECORATE sprite letter

Post by mallo »

Okay, thanks! Thankfully, i know what to do.

EDIT: Another question - I want to make enemy move a bit to the right, and a bit to the left. I don't know how. I don't know how to use A_ChangeVelocity (Or something like that)
User avatar
Mr. Tee
Posts: 1111
Joined: Sun Feb 08, 2004 7:49 pm
Contact:

Re: Moving Monsters without changing state.

Post by Mr. Tee »

I'm assuming you don't want to use the CHF_FASTCHASE property in A_CHASE which has the monster strafe left and right around the player?

http://zdoom.org/wiki/A_Chase

If not, you can use THRUSTTHING in an ACS script if you want it to move left and right at specific intervals (or random intervals depending on how the script is written).

http://zdoom.org/wiki/ThrustThing

Finally, here's how one could use A_CHANGEVELOCITY to do what you desire:

See:
SPRT A 4 A_ChangeVelocity (0, 12, 0, CVF_RELATIVE)
SPRT B 4 A_ChangeVelocity (0, -12, 0, CVF_RELATIVE)
Goto See

http://zdoom.org/wiki/A_ChangeVelocity

(someone correct me if this is wrong, I don't have ZDoom on this computer)

In this example, a monster's SEE state has two A_ChangeVelocity functions which alter the y-axis velocity (i.e. actor's left and right movement) by 12 units first in one direction, and next in the other direction. The constant CVF_RELATIVE ensures that the velocity will change according to the angle the actor is facing, as opposed to absolute map coordinates.
Locked

Return to “Editing (Archive)”