Scripting Question

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
Knuckx117
Posts: 2
Joined: Thu Aug 25, 2005 8:09 am
Location: Hackettstown, NJ
Contact:

Scripting Question

Post by Knuckx117 »

I'm trying to use the Thing_Projectilegravity action to spawn a thing at a random angle, but I can't find a piece of code that won't generate an error message when I try to compile it. If anyone could help me, it would be appreciated. It's for a single Pwad I'm making that I want to be called "A Battle in Hell"
User avatar
Grubber
Posts: 1031
Joined: Wed Oct 15, 2003 12:19 am
Location: Czech Republic
Contact:

Post by Grubber »

User avatar
solarsnowfall
Posts: 1581
Joined: Thu Jun 30, 2005 1:44 am

Post by solarsnowfall »

Thing_ProjectileGravity has a fixed angle.
Knuckx117
Posts: 2
Joined: Thu Aug 25, 2005 8:09 am
Location: Hackettstown, NJ
Contact:

Post by Knuckx117 »

okay then... if I can't have angle being a variable, then can someone give me an alternate portion of code that will let me spawn something and have it go off in a random direction?
User avatar
Enjay
 
 
Posts: 27266
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland
Contact:

Post by Enjay »

solarsnowfall wrote:Thing_ProjectileGravity has a fixed angle.
How do you mean "fixed angle"

Thing_ProjectileGravity (tid, type, angle, speed, vspeed)

Here's a typical example from one of my scripts to spawn some debris

Thing_ProjectileGravity(100, 64, random(0, 255), random(10, 40), random(5, 20));
User avatar
solarsnowfall
Posts: 1581
Joined: Thu Jun 30, 2005 1:44 am

Post by solarsnowfall »

Thanks.
Locked

Return to “Editing (Archive)”