Aight - A set of triggers that ain't working

For fulfilled maps that most likely don't work on the latest patch (1.24 or later).

Moderator: Cheaters

TechGeek001
Member
Posts: 50
Joined: December 29th, 2007, 7:34 am

Aight - A set of triggers that ain't working

Post by TechGeek001 »

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)
User avatar
Darkgarden
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

Post by Darkgarden »

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)
Image
Someday, someone will best me. But it won't be today, and it won't be you.

Thank JJ for his Cheatpack!
Also others who helped me learn how to put it in :)
User avatar
tru_power22
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

Post by tru_power22 »

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...
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.
User avatar
Aero
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

Post by Aero »

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.
TechGeek001
Member
Posts: 50
Joined: December 29th, 2007, 7:34 am

Re: Aight - A set of triggers that ain't working

Post by TechGeek001 »

what's this "memory leak"?

BTW, it worked perfectly Aero thx so much :D
User avatar
Aero
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

Post by Aero »

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.