OK, here's what I've got. What the first is supposed to do is when a player researches Recruit Riflemen, it adds them to a player group, which then applies the second trigger to them, which actually spawns the unit.
SetRifleman
Events
Unit - A unit Finishes research
Conditions
(Researched tech-type) Equal to Recruit Rifleman
Actions
Player Group - Add (Triggering player) to (All players matching ((Researched tech-type) Equal to Recruit Rifleman ))
Rifleman
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
Player Group - Pick every player in (All players matching ((Researched tech-type) Equal to Recruit Rifleman )) and do (Unit - Create 1 Rifleman for (Matching player) at ((Matching player) start location) facing Default building facing degrees)
Aight - A set of triggers that ain't working
Moderator: Cheaters
-
- Member
- Posts: 50
- Joined: December 29th, 2007, 7:34 am
-
- Junior Member
- Posts: 48
- Joined: February 14th, 2008, 2:55 pm
- Location: Boca Raton, Florida
Re: Aight - A set of triggers that ain't working
Shouldent the player group be under actions (im not sure but it sounds it should be there (no clue but hey may want to try it)
-
- Old Wrinkly Member
- Posts: 271
- Joined: January 12th, 2008, 4:42 am
- Title: Re-R-Re-Re-Remix
- Location: Canada EH?
Re: Aight - A set of triggers that ain't working
Player Group - Add (Triggering player) to (All players matching ((Researched tech-type) Equal to Recruit Rifleman ))
Should be
Player Group - Add ((Owner Of (Triggering Unit)) to (A_Variable)
For two reasons, this would work (i think) and you can avoid memory leaks.
Player Group - Pick every player in (All players matching ((Researched tech-type) Equal to Recruit Rifleman )) and do (Unit - Create 1 Rifleman for (Matching player) at ((Matching player) start location) facing Default building facing degrees)
Should be
Player Group - Pick every player in (A_Variable) Equal to Recruit Rifleman )) and do (Unit - Create 1 Rifleman for (Matching player) at ((Matching player) start location) facing Default building facing degrees)
Of course...
Should be
Player Group - Add ((Owner Of (Triggering Unit)) to (A_Variable)
For two reasons, this would work (i think) and you can avoid memory leaks.
Player Group - Pick every player in (All players matching ((Researched tech-type) Equal to Recruit Rifleman )) and do (Unit - Create 1 Rifleman for (Matching player) at ((Matching player) start location) facing Default building facing degrees)
Should be
Player Group - Pick every player in (A_Variable) Equal to Recruit Rifleman )) and do (Unit - Create 1 Rifleman for (Matching player) at ((Matching player) start location) facing Default building facing degrees)
Of course...
Contact me on WC3 Killing_Spree22, I'm at US west!
To avoid being a noob read this: http://forum.wc3edit.net/everything-els ... t4579.html
This is the official site for team UKS, it's also my home page - http://www.TeamUks.tk
I AM DEAD, I WILL NO LONGER BE POSING HERE. BEEN FUN WITH YOU ALL.
To avoid being a noob read this: http://forum.wc3edit.net/everything-els ... t4579.html
This is the official site for team UKS, it's also my home page - http://www.TeamUks.tk
I AM DEAD, I WILL NO LONGER BE POSING HERE. BEEN FUN WITH YOU ALL.
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Aight - A set of triggers that ain't working
Make a player group variable. In my example, I will use "PlayerGroup" as my player group. Also note that I'm not using real GUI...just explaining what should happen.
SetRifleman
Events
Unit - A unit Finishes research
Conditions
(Researched tech-type) Equal to Recruit Rifleman
Actions
Player Group - Add Owner of TriggeringUnit to PlayerGroup
Rifleman
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
Player Group - Pick every player in PlayerGroup and do Create one Rifleman for Picked Player at Picked Player's start location facing default building facing degrees
This only leaks a point (Picked Player's start location) unless the gui behind it returns a location stored in an array or something.
I would assume a leak though.
SetRifleman
Events
Unit - A unit Finishes research
Conditions
(Researched tech-type) Equal to Recruit Rifleman
Actions
Player Group - Add Owner of TriggeringUnit to PlayerGroup
Rifleman
Events
Time - Every 2.00 seconds of game time
Conditions
Actions
Player Group - Pick every player in PlayerGroup and do Create one Rifleman for Picked Player at Picked Player's start location facing default building facing degrees
This only leaks a point (Picked Player's start location) unless the gui behind it returns a location stored in an array or something.
I would assume a leak though.
-
- Member
- Posts: 50
- Joined: December 29th, 2007, 7:34 am
Re: Aight - A set of triggers that ain't working
what's this "memory leak"?
BTW, it worked perfectly Aero thx so much
BTW, it worked perfectly Aero thx so much
-
- Forum Staff
- Posts: 829
- Joined: January 28th, 2007, 8:10 pm
- Title: JASS Programmer
- Location: Canada
Re: Aight - A set of triggers that ain't working
In terms of wc3, it's allocated memory that can no longer be accessed by WC3 to recycle. This causes a deficit of memory. With enough leaks, this will result in laggy gameplay.