Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
  • 0
THMG

Script producing the wrong results

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

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

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
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

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
×