Advanced Search

Author Topic: DECORATE Questions  (Read 2292 times)

0 Members and 1 Guest are viewing this topic.

January 27, 2011, 12:15:55 AM
Read 2292 times

Offline SickSadWorld

  • MM8BDM MM8 Contributor
  • ****
  • Date Registered: December 03, 2010, 07:35:28 AM

    • View Profile
DECORATE Questions
« on: January 27, 2011, 12:15:55 AM »
As I'm trying to do more and more DECORATE stuff from scratch I find I have more and more questions. Maybe others can use this thread for their questions about DECORATE as well! I'm sure I'll have more.

1) A_CustomMissile

Code: [Select]
A_CustomMissile (string missiletype[, float spawnheight[, int spawnofs_horiz[, angle angle[, int aimflags[, angle pitch]]]]])
What units are the angle and pitch expected in? Is angle 0-360 degrees or byte angles? What about pitch?


----------


2) goto +syntax

How does the + syntax work on goto? Is it advancing by LINE or by frames?

Here's a simple example
Code: [Select]
actor Blabla 69420
{
// some flags here
States
{
  Spawn:
  FRAM A 0 A_Look
  loop
  See:
  FRAM A 4
  FRAM A 8
  FRAM A 16
  FRAM A 64
  goto See+4 // WHERE DOES THIS JUMP TO?

// death etc here
}




More on the way I'm sure.

January 27, 2011, 12:18:04 AM
Reply #1

Offline Ivory

  • MM8BDM Extender
  • *********
  • Date Registered: August 25, 2009, 08:17:59 AM

    • View Profile
    • http://www.cutstuff.net/
Re: DECORATE Questions
« Reply #1 on: January 27, 2011, 12:18:04 AM »
1) I believe it's 0-360. As for Pitch, it effects the pitch up or down.

2) Go to the see state +4 frames.

January 27, 2011, 02:46:06 AM
Reply #2

Offline SickSadWorld

  • MM8BDM MM8 Contributor
  • ****
  • Date Registered: December 03, 2010, 07:35:28 AM

    • View Profile
Re: DECORATE Questions
« Reply #2 on: January 27, 2011, 02:46:06 AM »
Quote from: "Ivory"
As for Pitch, it effects the pitch up or down.

I am quite familiar with terms such as pitch and yaw. I know what pitch does. My question is, what UNIT is it expressed in specifically for DECORATE? 0-360 in degrees for angle measurements helps me out a ton, thanks!

Quote from: "Ivory"
2) Go to the see state +4 frames.

Thanks Ivory

But where is that, I still don't understand... does it advance 4 tics? or does it jump to

Code: [Select]
FRAM A 64

in my above example? I'm sorry to ask these questions, but the ZDoom wiki does not make it clear and the manual page has no such examples for this.

January 27, 2011, 03:05:02 AM
Reply #3

Offline Ivory

  • MM8BDM Extender
  • *********
  • Date Registered: August 25, 2009, 08:17:59 AM

    • View Profile
    • http://www.cutstuff.net/
Re: DECORATE Questions
« Reply #3 on: January 27, 2011, 03:05:02 AM »
No problem. Though for Number 2, It's still answered.
Go to see state, plus 4 FRAMES

As for Angle Pitch, Positive Numbers upwards, negative numbers is downwards.
I'm not sure of the ranges, but 0 to 30 and 0 to -30 should be about right.

January 27, 2011, 03:38:40 AM
Reply #4

Offline SickSadWorld

  • MM8BDM MM8 Contributor
  • ****
  • Date Registered: December 03, 2010, 07:35:28 AM

    • View Profile
Re: DECORATE Questions
« Reply #4 on: January 27, 2011, 03:38:40 AM »
Quote from: "Ivory"
No problem. Though for Number 2, It's still answered.
Go to see state, plus 4 FRAMES

Can you clarify what a frame is in lay terms? Using my original example if possible, please? It's not real code and I'm not asking you to do work for me, but it would make your explanation a lot clearer.

That means the letters right?

This code crashes skulltag for some reason. This means it cant be indexing frames directly, so I must be misinterpreting your response in some way
Code: [Select]
 See:
   SCBM C 0 A_ChangeFlag("INVULNERABLE",0)  // 1 frame??
SCBM CCDDEE 4  // 6 frames???
SCBM C 0 A_JumpIfCloser(256, "Missile")
    goto See+7 // want to skip to jump if closer.. what is a FRAMES??

January 27, 2011, 03:44:17 AM
Reply #5

Offline Ivory

  • MM8BDM Extender
  • *********
  • Date Registered: August 25, 2009, 08:17:59 AM

    • View Profile
    • http://www.cutstuff.net/
Re: DECORATE Questions
« Reply #5 on: January 27, 2011, 03:44:17 AM »
Yes, in terms of what you said, that is a frame. See+7 would skip
Code: [Select]
SCBM C
SCBM CCDDEE

As for the crashing. I'm not entirely sure, it may have something to do with that last frame being 0 tics then hitting the goto again immediately.

January 29, 2011, 10:51:56 PM
Reply #6

Offline SickSadWorld

  • MM8BDM MM8 Contributor
  • ****
  • Date Registered: December 03, 2010, 07:35:28 AM

    • View Profile
Re: DECORATE Questions
« Reply #6 on: January 29, 2011, 10:51:56 PM »
Quote from: "Ivory"
Yes, in terms of what you said, that is a frame. See+7 would skip
Code: [Select]
SCBM C
SCBM CCDDEE

As for the crashing. I'm not entirely sure, it may have something to do with that last frame being 0 tics then hitting the goto again immediately.

Forgot to follow up on this.

Thanks for your help, and you were right about the explanation of the crash.

Although this issue is resolved I'd prefer you not lock this topic so that I or others may use this topic later for DECORATE specific issues, rather than opening a new one.