Many novices do not know how to record the player's hero with variables
First, let's create a new unit array variable like YX
Generally the map is double-click to select a hero, just add a line to the select hero action
Set YX [(player's index number of (trigger player)] = (trigger unit)
This completes the recording of the player's hero Player 1 - Player 12's player index number is 1-12
For example, if player 1 chooses a hero, it is equivalent to YX[1] = (trigger unit)
A lot of things become simple after recording player heroes
The most basic is HG back to the city
event
Player - Any player enters hg and the information filter is filtered to match exactly
condition
action
Units - Immediately moves YX [(the player index number that triggers the player)] to JIA
Lens - Pans (triggers the player) of the lens to JIA for 0.00 seconds
Here to explain that the above is the variable JIA map initialization set JIA=XX area center point and then call this variable like the above line Does not excrete convenient and efficient, but be careful not to clear this point
Some commonly used fixed points can be used in this way to do offensive points, spawn points and so on
For example, the assistant's ability to eat books must be removed and the trigger is used to increase the attribute
event
Units - Any unit obtains items
condition
((Type of Manipulated Item) equals Book of Agility +100
action
Hero - Modified Agility to YX [(The player index number of (owner of the trigger unit)]] : Adds 100 points
And that's okay, and if there's no record, you need to use unit groups to select units, but you also need to excrete more troublesome
For example, if you enter a copy, there is an assistant assistant in the map who cannot enter the copy normally
event
Units - Any unit Sells units
condition
((Type of Trafficked Unit)) equals XX copy
action
Units - Delete (Trafficked Units)
Inverse sky [YDWE] - set [point] loc_p = (<预设>center point of jin6)
Units - Immediately move YX [((owner of the purchaser)] to (loc_p)
Lens - Pans the lens (the purchaser's owner) to (loc_p) for 0.00 seconds
Point - Clear (loc_p)
The above copy is made with units or can be made with books to make it more convenient without deleting units
If you do this, even if the assistant buys it, it is still a teleporter hero
But one problem is that heroes don't have to go home to teleport directly to the new quest
Failure to do so would be more cumbersome as previously done
event
Units - Any unit Sells units
condition
((Type of Trafficked Unit) equals Challenge Level 1 BOSS
action
Units - Delete (Trafficked Units)
Run if (all conditions are true) Then (Action) Run otherwise (Else - Action)
If - Condition
((Purchaser) is Hero) equals TRUE
Then - Action
Units - Move Immediately (Purchaser) to (Center Point of Jinboss1 <预设> )
Lens - Pans the lens (the owner of the purchaser) to the center point (jinboss1 <预设> ) for 0.20 seconds
Else - Action
Player - Increases the existing wood by 5 (the owner of the purchaser).
Game - Sends a text message showing 10.00 seconds to (convert ((the purchaser's owner) to the player group): The assistant cannot enter...
If you need to judge if the hero is not a hero, you have to return the wood The above point is not excreted It is best to excrete with the above set point, clear the point way
Some are not commonly used in actions
Moves all player heroes to a specified area
Loop action [loop integer A] from 1 to 6, run (Loop - action)
Loop - Action
Units - Immediately moves YX [looping integer A [R]] to ((center X coordinate of rectangular region 001 <预设> ), (<预设>center Y coordinate of rectangular region 001))
This trigger assumes that there are 6 players, which is a loop integer 1-6, and this time the coordinates are used so that there is no need to excrete
Add attributes to all players' heroes
Loop action [loop integer A] from 1 to 6, run (Loop - action)
Loop - Action
Hero - Modified Strength to YX [Circular integer A [R]]] : Adds 10 points
Move all player shots to their hero position This action is generally used after the end of the mini-game
Loop action [loop integer A] from 1 to 6, run (Loop - action)
Loop - Action
Lens - Pans the lens (owner of the loop integer A [R]] to (the position of YX [loop integer A [R]]) for 0.00 seconds
Looking at the above actions, as long as they are for all player heroes, they can be implemented with the round integer A1-6
The following trigger is to determine that the player hero is in a certain area to make an action on the player
Loop action [loop integer A] from 1 to 6, run (Loop - action)
Loop - Action
Run if (all conditions are true) Then (Action) Run otherwise (Else - Action)
If - Condition
(Rectangular region 001 <预设> memory in YX [loop integer A [R]]) equals TRUE.)
Then - Action
Game - Pair (owner of YX [loop integer A [R]]) displays text at screen shift (0.00, 0.00): Test!
Else - Action
The above action means that a player hero will do an action on this player if he meets the conditions, and he can achieve a lot of effects by changing the conditions.