Items dropped from monsters
-
Flaminglacier
- Posts: 65
- Joined: Thu Jun 21, 2012 9:28 pm
Items dropped from monsters
I know how to specify which object is dropped by which actor but I was wondering if there was any way to make the dropped items spread out in different directions when dropped. When I have a monster drop multiple items they all drop in the same spot, is there anyway to make like an explosion effect where the items burst out into different directions.
- CloudFlash
- Zandrone
- Posts: 1074
- Joined: Mon Jun 04, 2012 5:35 pm
- Location: Wonderland (except not really)
RE: Items dropped from monsters
If you are using DECRATE, simply change the 5th, 6th and 7th value of A_SpawnItemEx from '0' to 'random(-10,10)'.
If you are using ACS, use DECORATE.
If you are using ACS, use DECORATE.
Last edited by CloudFlash on Sat Jul 05, 2014 8:27 pm, edited 1 time in total.
https://i.imgflip.com/i5tpe.jpg
*Hey, who wants to hear my solution to the modern world's problems? ^Me! %Me! @Me! #Me! *WELL TOO BAD @Did he just stab himself with this butcher knife? %Looks like it ^Hey, the pizza guy arrived! %Pizza! Yey
*Hey, who wants to hear my solution to the modern world's problems? ^Me! %Me! @Me! #Me! *WELL TOO BAD @Did he just stab himself with this butcher knife? %Looks like it ^Hey, the pizza guy arrived! %Pizza! Yey
RE: Items dropped from monsters
Or make each dropped item do ThrustThing(random(0,255),2,0,0) in its spawn state.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)

-
Flaminglacier
- Posts: 65
- Joined: Thu Jun 21, 2012 9:28 pm
-
Flaminglacier
- Posts: 65
- Joined: Thu Jun 21, 2012 9:28 pm
RE: Items dropped from monsters
When I use this method it seems to spawn 3 of the item I want to spawn. Is there anyway to set the amount of the item I want to spawn?CloudFlash wrote: If you are using DECRATE, simply change the 5th, 6th and 7th value of A_SpawnItemEx from '0' to 'random(-10,10)'.
If you are using ACS, use DECORATE.
- CloudFlash
- Zandrone
- Posts: 1074
- Joined: Mon Jun 04, 2012 5:35 pm
- Location: Wonderland (except not really)
RE: Items dropped from monsters
Hmmm.
The amount of items spawned with a_spawnitemex is always exactly one per frame...
So for example if you make it look like
TNT1 A 0 A_SpawnItemEx(stuff), you get one item; If you do
TNT1 AAA 0 A_SpawnItemEx(stuff), you get three items; If you do
TNT1 AAAAAAAAAA 0 A_SpawnItemEx(stuff), you get ten, etc etc.
This is really helpful if you want to have something spawn really huge number of items, but you dont want to flood your code with one repeated line over and over again :P
The amount of items spawned with a_spawnitemex is always exactly one per frame...
So for example if you make it look like
TNT1 A 0 A_SpawnItemEx(stuff), you get one item; If you do
TNT1 AAA 0 A_SpawnItemEx(stuff), you get three items; If you do
TNT1 AAAAAAAAAA 0 A_SpawnItemEx(stuff), you get ten, etc etc.
This is really helpful if you want to have something spawn really huge number of items, but you dont want to flood your code with one repeated line over and over again :P
Last edited by CloudFlash on Wed Jul 09, 2014 7:08 am, edited 1 time in total.
https://i.imgflip.com/i5tpe.jpg
*Hey, who wants to hear my solution to the modern world's problems? ^Me! %Me! @Me! #Me! *WELL TOO BAD @Did he just stab himself with this butcher knife? %Looks like it ^Hey, the pizza guy arrived! %Pizza! Yey
*Hey, who wants to hear my solution to the modern world's problems? ^Me! %Me! @Me! #Me! *WELL TOO BAD @Did he just stab himself with this butcher knife? %Looks like it ^Hey, the pizza guy arrived! %Pizza! Yey
-
Flaminglacier
- Posts: 65
- Joined: Thu Jun 21, 2012 9:28 pm
RE: Items dropped from monsters
Thank you that helps a lot. but if for example the amount of frames was 10 would that mess up the animation length or stretch the death animation?
RE: Items dropped from monsters
No because they have zero tics per frame, so they're simultaneous.
"For the world is hollow, and I have touched the sky."
