Saturday, April 14, 2012

Ownership Triggers

[:1]I'm currently in the middle of remaking Eras Zombie Invasion, everythings going quite well, except for two problems I'm having with triggers

The first one is for the -give command I wish to add,

I want to make it so that if you select a unit/group of units, and type "-give [playercolour]" It will transfer that unit to the ownership of said player, but unfortunately, this allows you to select any unit on the map, enemies inluded, and transfer it to any player on your team. If anyone could help me with a trigger that works please :D



The next problem is I need hostile cities to change ownership when they lose 50% of their health. I have tried several different triggers for this and have had no luck at all. The ownership should change to the owner of the attacking unit. If anyone could help me with this it would be great.

Thanks in advance. :D|||Don't listen to the above post (LOL), shoes aren't the answer...

First question:

Example

You need 2 triggers

1 for the event when a player types a chat message

1 for the event when player selects a unit

First Trigger: (INITIALY OFF)

Message

Event

Player- Player 1 types a message containing color blue as an exact match

Condition-

Action-

Change ownership of selected unit to player 2 blue, change color

Turn off this trigger

Second Trigger:

Select Unit

Event

A unit owned by player 1 red is selected

Condition-

Action

Turn on Message

Second question:

Example:

Event-

Unit- (Your Unit here)'s hp becomes lesser or equal to 500

Condition-

Action-

Unit- Change ownership of triggering unit to owner of attacking unit, change color

Unit- Set life of ownership-changed unit to 100%

Hope I helped!

No comments:

Post a Comment