HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A beginner's trigger question

05-13-2007, 02:05 PM#1
Dooblivion
Hello people.
I read some tutorials so far but in another map i'm doing, it goes like this:
A zombie spawns and kills a human. That human is converted to a zombie and will attack its previous allies.
Simple...yet I'm confused

Well not confused but I just want to know is there a trigger to make that dead human change forces with the zombie (automaticly puting him in alliance with the zomby(ies) if there are more humans that died before him, and making him enemy to the surviving humans. The humans will then threat him as an enemy to.)

As I said, this is a beginner's problem

Hey Pyrogasm, if you read this and see my signature tell me what you think of it :)
05-13-2007, 02:08 PM#2
Rising_Dusk
Trigger Forum is where trigger questions go.
For future reference.

Trigger:
Unit - Change ownership of MyUnit to NewPlayer and Change color
Collapse JASS:
call SetUnitOwner(MyUnit, NewPlayer, ToChangeColorBoolean)

If you want to change the player's alliance settings, there are options to do that as well.
Trigger:
Player - Make DeadHumanPlayer treat ZombiePlayer as an Ally with shared vision
And so forth.
05-13-2007, 02:09 PM#3
MercyfulJester
Player - Set Alliance
05-13-2007, 02:17 PM#4
Dooblivion
Hmm...think I should make it more clear. Because that's not exaclty my hoping answer... K next time i'll put it in trigger forum

K nvm I get it. I figuered I was just confused with wich trigger and the order to put them in.
If what I try Isn't correctly working I'll send my errors to this post.
Sorry for the misspelling your name.
Ty
05-13-2007, 02:22 PM#5
Toink
It's Rising_Dusk not Husk.
No offense Dusk, but I have seen some people say Rising_Duck and an insult, which is Rising_Co**
05-13-2007, 08:42 PM#6
Pyrogasm
Your signature needs punctuation, and it doesn't make any sense :P
______

Wouldn't it be easier to just create a new unit for the zombie player?


Oh, and I moved the thread to Triggers/Scripts.
05-14-2007, 01:50 AM#7
Dooblivion
Lol, makes sense to me.
Yes it would be easier but it's gona be a little boring because in this map a zombie kills humans and each human (exept runner) is turned into a zombie under his control. So I want the dead runner to still have a role in the game. I wana do like vampirensm.

Here's my problem I can make the new zombie ally togheter with THE ZOMBIE but I have no idea how do I make him ally with the other dead runners that have become zombies. And make the futur zombies ally with him.
05-14-2007, 04:18 AM#8
Pyrogasm
Create a "Player Group" variable and add the Zombie player(s) to it at map initialization. Then, when a player needs to become allied with the zombies and everyone else, have him treat everyone in that Player Group variable as an ally, and have each of them now treat him as an ally. Then, add that player to the player group.


Make sense?
05-14-2007, 04:36 AM#9
Zwan
Quote:
Originally Posted by Dooblivion
Lol, makes sense to me.

Ok so I get the frail youth part, but what the hell is "And now if a rooted hulk"? Is it supposed to be now I'm a rooted hulk?

man, that's fuckin deep, I'm gonna go ponder the universe and shit. Thank god I happened upon this thread.
05-14-2007, 09:32 PM#10
Dooblivion
lol go for it. Ya I find it to deep to.
I feel like puting something about sex but not so sure if its a rule :P
is pyro?...hey pyrogasm is like orgasm so it should be ok:)
Omg...ya its supose to be I'm


Pyrogasm's post: K i'll try that

Hm...can you explain more I don't seem to understand or maybe I got the trigger wrong
05-15-2007, 05:53 AM#11
Pyrogasm
Yes, my name is in fact a reference to an obsession with Fire that could give one a 'pyroclastic orgasm'; I am not, however, a pyromaniac.

As to what I meant; let's assume the Player Group variable is called "Zombie_Players":
The Initialization Trigger:
Collapse Events
Map Initialization
Conditions
Collapse Actions
Player Group - Add Player 12 (Brown) to Zombie_Players
----- Changing "Player 12" to whatever player your Zombies originally start out as -----
The above trigger sets up the player group variable. The trigger below is what happens when a player becomes a zombie player.
Trigger:
Collapse Events
----- Whatever your events are -----
Collapse Conditions
----- Whatever your counditions are -----
Collapse Actions
----- Whatever some of your other actions are; the bottom takes care of all the player group settings; let's assume that a unit triggers this trigger -----
Collapse Player Group - Pick every player in Zombie_Players and do (Actions)
Collapse Loop - Actions
Player - Make (Owner of (Triggering Unit)) treat (Picked Player) as an Ally with shared vision
Player - Make (Picked Player) treat (Owner of (Triggering Unit)) as an Ally with shared vision
Player Group - Add (Owner of (Triggering Unit)) to Zombie_Players
As you can see, it will make the triggering player ally all zombie players and vice versa. Then, it adds that player to the zombie player group.


You may have to set players as enemies too, but I'm not sure if it automatically does that after you make the zombie players and the triggering player allies.

EDIT: I'm pretty sure there's only one "m" in "vomit".
05-17-2007, 01:38 AM#12
Dooblivion
Right thank you now my map is nearly finished.