Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* here is relevant base spawner class from main decorate file */
- ACTOR Base_Spawner
- {
- +THRUACTORS
- +NOGRAVITY
- +NOCLIP
- +NOINTERACTION
- Damage 100
- var int user_player[64];
- States
- {
- Spawn:
- TNT1 AAAAAA 0
- TNT1 AAAAAA 0
- TNT1 A 1 A_JumpIf(TRUE,"Spawn2")
- Wait
- Spawn2:
- TNT1 AAAAAA 0
- TNT1 AAAAAA 0
- TNT1 A 1 ACS_ExecuteWithResult(860, Damage) /* item spawning script */
- TNT1 AAAAAA 0
- TNT1 AAAAAA 0
- TNT1 A 1 A_JumpIf(TRUE,"Spawn3")
- Wait
- Spawn3:
- TNT1 A 105
- TNT1 A 0 A_JumpIf(TRUE,"Spawn2")
- Wait
- }
- }
- /* here is a typical _Spawner actor and typical *_Pickup actor; all *_Spawner actors inherit from Base_Spawner, and each Pickup_** actor inherits from the 00 pickup actor, all have different explicit args they send to the pickup script */
- ACTOR Clip_Spawner : Base_Spawner Replaces Clip { Damage 3 }
- ACTOR Clip_Pickup_00 : CustomInventory
- {
- Inventory.PickupMessage "$GOTCLIP"
- +INVENTORY.AUTOACTIVATE
- States
- {
- Spawn:
- "----" AAAAAA 0
- "----" AAAAAA 0
- "----" A 1 ACS_ExecuteAlways(OPPP_vis) /* clientside script to make pickup visible or invisible */
- Loop /* Wait */
- NoSee:
- TNT1 A 1
- Loop
- CanSee:
- CLIP A 1
- Loop
- Pickup:
- "----" A 0 A_JumpIf(ACS_ExecuteWithResult(OPPP_pickup, 00),"PickupSuccess") /* pickup script */
- Goto PickupFail
- PickupSuccess:
- "----" A 0 A_JumpIfInventory("Clip", 0, "PickupFail")
- "----" A 0 A_GiveInventory("Clip", 10)
- Stop
- PickupFail:
- "----" A 0
- Fail
- }
- }
- ACTOR Clip_Pickup_01 : Clip_Pickup_00
- {
- States
- {
- Pickup:
- "----" A 0 A_JumpIf(ACS_ExecuteWithResult(OPPP_pickup, 01),"PickupSuccess") /* pickup script */
- Goto PickupFail
- }
- }
- ACTOR Clip_Pickup_02 : Clip_Pickup_00
- {
- States
- {
- Pickup:
- "----" A 0 A_JumpIf(ACS_ExecuteWithResult(OPPP_pickup, 02),"PickupSuccess") /* pickup script */
- Goto PickupFail
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement