HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Triggering

12-02-2003, 08:37 PM#1
SoulReaver
Allright, i use to remember how to do this, but i havent triggeret for 999999 years so here it goes:

1)I'm having a arena with heroes. How do i make it last man standing, so that last hero alive wins?


2) If no player is playing or he leaves, the computer player will take over, how do i make a good AI were the computer use his skills and buy items?!

3) Keep rolling!
12-02-2003, 08:42 PM#2
35263526
1)The easiest way would be to create an interger variable called Heros Left.

Then make a triggers:

EVENTS:
A generic unit dies

CONDITIONS:
Dying unit is equal to a hero

EVENTS:
Set Heros Left = Heros Left - 1
If Heros Left equal to or less than 0, then do:
Pick every unit in playable map area matching condition Picked Unit is alive And Picked upt is a hero and do:
Game - Declare victory for owner of picked unit.

2) Thats a tough one, not my call.

3)Whatever
12-02-2003, 11:29 PM#3
SpectreReturns
Computers will already use their skills automaticly, maybe just give them the 'Wander' ability, and they will move towards random locations.
12-03-2003, 12:06 PM#4
SoulReaver
No they are not using their abilities :( and i want it to be a last man standing with teams.
12-03-2003, 03:29 PM#5
Vexorian
Quote:
Originally posted by SoulReaver

2) If no player is playing or he leaves, the computer player will take over, how do i make a good AI were the computer use his skills and buy items?!

hmmn, that's one of Vexha's key features, anyways:

To make computers use their skills have a trigger that runs whenever a computer hero gains a level, then use the trigger action that makes them learn a skill with every posible ability, that'll make the heroes learn the abilities they can (use JASS so they can learn custom abilities too) the computers will automatically use the abilities when needed.

About items, that really needs jass and the use of a native called NeutralIssueItemBuyOrder or something like that (just find it in common.j) using that native you can order the players to buy items, the computers will automatically use the items when needed.

About the computer taking control of a player when he leaves, could you tell me how do you do that?
12-03-2003, 04:35 PM#6
Newhydra
Look at this map vex...it's protected but I'm sure you can figure out how to get at the triggers...When a player leaves they become controlled by a computer. (I haven't looked at it...it might not make the units controlled by a computer at all but rather start giving them orders...)
12-03-2003, 05:03 PM#7
SoulReaver
Okay, so here is how it goes or what?


EVENT - Blademaster001(example) - gains a level

ACTION - Set integer - random number between 1-4
ACTION - If then else - if integer equal to 1 then do learn wind walk for blademaster001
ACTION - If then else - if integer equal to 2 then do learn critical strike for blademaster001
ACTION - If then else - if integer equal to 3 then do learn mirror image for blademaster001
ACTION - If then else - if integer equal to 4 then do learn bladestorm for blademaster001

Was that right?


Btw, the last man standing is in teams so how do i make it then?