You must be logged in to post messages.
Please login or register

Scenario Design
Moderated by Crazed Ewok, Gen_Rhys_Dallows

Hop to:    
Welcome! You are not logged in. Please Login or Register.2 replies
SWGB Heaven » Forums » Scenario Design » Untargetted 'Destroy Object' condition
Bottom
Topic Subject:Untargetted 'Destroy Object' condition
Xzimnut
Clone Trooper
posted 08-14-19 02:32 PM EDT (US)         
Hi guys!

I am working on a MP scenario where rather than having to gather ressource, players have to destroy cargo hovercrafts from an AI player. I'm relatively new to scenario editing and to me, the simplest way to do that is to create a trigger with a condition 'Destroy Object' that would have a tribute effect. However, for that I would have to create a trigger for each hovercraft, and it would not work if the player creates new units.

So would there be a way to have this tribute effect triggered each time an hovercraft is destroyed without having to target each specific unit. Like a way to tell the game to trigger the effect each time an object fulfill the condition type=cargo hovercraft but not one in particular?

Thank you very much!
AuthorReplies:
Gen_Rhys_Dallows
Jedi Knight
posted 08-14-19 03:34 PM EDT (US)     1 / 2       
You might have to use Own Objects/Own Fewer Objects, but it would only really work reliably if the AI only has a single Hovercraft alive at a time.

TRIGGER 0
Display as Obj: No
Starting State: On
Looping: Off
Condition 0: Own Object
Cargo Hovercraft
Quantity: 1

Effect 0: Activate Trigger
Trigger 1

This detects when the AI has 1 living Hovercraft and activates the next trigger in the sequence.

TRIGGER 1
Display as Obj: No
Starting State: Off
Looping: Off
Condition 0: Own Fewer Objects
Cargo Hovercraft
Quantity: 0

Effect 0: Tribute
Effect 1: Activate Trigger
Trigger 0

This detects that the AI no longer owns the Hovercraft, likely meaning it was destroyed. It tributes resources and reactivates the first trigger. Though, the detection could also be activated by whatever trigger creates the hovercraft to begin with.

ARMY STRONG
"Rhys wins this thread." - Tsavong Lah | "Gen freakin wins." - Jon Rolos | "...Any mercenary force trained by you, Dallows, would be all kinds of awesome." - Flying Ace
Expanding Fronts Mod

[This message has been edited by Gen_Rhys_Dallows (edited 08-14-2019 @ 03:35 PM).]

Xzimnut
Clone Trooper
posted 08-15-19 10:24 AM EDT (US)     2 / 2       
Wow, thanks for the quick answer, that sounds like a good alternative! I will give it a try and see how it turns out.
You must be logged in to post messages.
Please login or register

Hop to:    

SWGB Heaven | HeavenGames