Spawning explosions

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
jobro
Posts: 206
Joined: Sat Dec 30, 2006 1:56 pm

Spawning explosions

Post by jobro »

How can you spawn just a simple explosion? Say that you have a slkybox depicting a warzone, how do I spawn explosions? And also, can you spawn individual lightpoint that enlightens the environment?
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Post by XutaWoo »

Code: Select all

actor BossRocket : Rocket
{
  states
  {
  Spawn:
    MISL BC 10 bright
    MISL D 10 bright A_BrainExplode
    stop
  }
}
Yay. This should do it. Just add this into decorate:

Code: Select all

actor Explosion : BossRocket 22222
{
  spawnid 512
}
You can change the SpawnID and DoomEdNum
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Spawn IDs must be between 1 and 255. 512 doesn't work.
User avatar
XutaWoo
Posts: 4005
Joined: Sat Dec 30, 2006 4:25 pm
Location: beautiful hills of those who are friends
Contact:

Post by XutaWoo »

Then make that you can change the DoomEdNum, and you have to change the SpawnID. I'm not a scripter. D=
User avatar
edward850
Posts: 5902
Joined: Tue Jul 19, 2005 9:06 pm
Location: New Zealand
Contact:

Post by edward850 »

Graf Zahl wrote:Spawn IDs must be between 1 and 255. 512 doesn't work.
Why the hell did you make it like that anyway?
User avatar
Zippy
Posts: 3302
Joined: Wed Mar 23, 2005 5:31 pm
Location: New Jersey

Post by Zippy »

Well, considering the max is 255, one imagines it is used in spots where only a byte of space is given.
User avatar
Isle
Posts: 687
Joined: Fri Nov 21, 2003 1:30 am
Location: Arizona, USA

Post by Isle »

you dont need a spawn id for spawn()
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

edward850 wrote:Why the hell did you make it like that anyway?
Thing_Spawn (which uses the spawnid property) is a action special. Action specials can only take bytes as parameters. If you have a problem with that, take it up with Raven.
User avatar
Cutmanmike
Posts: 11354
Joined: Mon Oct 06, 2003 3:41 pm
Operating System Version (Optional): Windows 10
Location: United Kingdom
Contact:

Post by Cutmanmike »

Spawnspot is a much better function anyway.
User avatar
Grubber
Posts: 1031
Joined: Wed Oct 15, 2003 12:19 am
Location: Czech Republic
Contact:

Post by Grubber »

HotWax wrote:Action specials can only take bytes as parameters.
You can use full integers for (some of) them in ACS. [wiki]Scroll_Floor[/wiki] and [wiki]Scroll_Ceiling[/wiki] actually benefit from that.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

When called from ACS or set via setthingspecial/setlinespecial all parameters are full 32 bit integers. But the spawn ID table has never been extended beyond 256 and never will because all thing_spawn functions have been superseded by versions that can take an actor's class name - and for the few remaining tasks 255 is enough.
Locked

Return to “Editing (Archive)”