Jump to content
  • 0

Script producing the wrong results


THMG

Question

So, my script, which is fired by a switch, looks like this:

#include "zcommon.acs"

script 1 (VOID)
{
	Print(s:"Greedy! Hope you grabbed the shotgun!");
	Floor_LowerToNearest(1,8);
	Thing_Spawn(3,"Demon",315,0);
	Thing_spawn(2,"HellKnight",315,0);
	
}

And is supposed to spawn 1 hellknight and 3 demons, at the angle 315. Instead, it spawns 1 chaingunner in place of the hellknight, and Shotgunguys instead of demons, and both are facing at the opposite angle to the way they are supposed to. What the hell is happening? I've only tested in GZDoom 3.2.4.

 

EDIT: Duur hurr i'm an idiot who forgot how classes are handled

Edited by THMG

Share this post


Link to post

3 answers to this question

Recommended Posts

  • 0

Try this:

 

#include "zcommon.acs"
script 200 OPEN
{
    Print (s:"Greedy! Hope you grabbed the shotgun!");
    delay (70);
    Floor_LowerToNearest (1, 8);
    Thing_Spawn ( 3, T_DEMON, 315, 0);
    Thing_spawn ( 2, T_HELLKNIGHT, 315, 0);
}

 

Share this post


Link to post
  • 0

Thing_Spawn:



135:Thing_Spawn (tid, type, angle, newtid)


Spawns a thing using its spawn ID. For spawning things by name, use SpawnSpot instead.

tid: Thing ID of the map spot where to spawn the thing

type: Type of thing to spawn, from the list of spawn numbers

When using this special on a linedef or a thing in UDMF, you can use the arg1str property to define a class name instead of the arg1 property to define a spawn number.

angle: Byte angle for the thing to face

newtid: TID to give spawned thing

 

So the question is, are you mapping in UDMF format or not?

Share this post


Link to post
  • 0
35 minutes ago, Kappes Buur said:

Try this:

 


#include "zcommon.acs"
script 200 OPEN
{
    Print (s:"Greedy! Hope you grabbed the shotgun!");
    delay (70);
    Floor_LowerToNearest (1, 8);
    Thing_Spawn ( 3, T_DEMON, 315, 0);
    Thing_spawn ( 2, T_HELLKNIGHT, 315, 0);
}

 

Thank you. I just came off a project where I used spawnspot instead of Thing_Spawn, so I forgot how the naming conventions worked.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...