Welcome to the BF Forums! Register Now, It's Free!

Welcome to the BF Forums; your source for the latest and greatest video game news, strategies, discussions, and resources. Join over 60,000 like-minded gamers from around the world to chat about your interests in our community.

You are currently viewing the forums as a guest user, which limits your access to certain content, contests, downloads, and more. By joining our free community, you will be able to respond in discussions/articles, contact members privately (PM), participate in regular-scheduled contests, see less advertisements, and have access to many other features. Registration is quick, easy, and completely free.

Have your questions answered. Share your thoughts about a topic. Take 2 minutes, Register Now!
BattleForums.com Forums > Major Games > Warcraft > Warcraft Maps and Modifications

Reply
 
Thread Tools Display Modes
Old 04-09-2006, 02:13 PM   #1 (permalink)
BattleForums Newbie
 
Join Date: Apr 2006
Posts: 10
Plunder!

Hello. I have a unit named Bandit on my map, and the Bandit has the Factory-ability which makes it spawn one "Plunder-Unit" every minute. The Plunder-Unit lives 1 second and when it dies I have a trigger that gives me 1 gold. But because the Bandits have this ability they cant be in the same group as other units. Kinda like when you try to mark several buildings in the same group when you drag the cursor over them. Only one building will be marked. Anyways, I was wondering however it is possible for the Bandit to give me 1 Gold every second without the use of the Factory-ability? Thanks.
Hanz is offline   Reply With Quote
Old 04-09-2006, 03:47 PM   #2 (permalink)
BANNED
 
Venice_native's Avatar
 
Join Date: Oct 2004
Location: Auburn
Posts: 2,014
I haven't used map editor in a while, but structurally, it'd be like

Bandit Exists: Add one gold, preserve, repeat 1 second.
Venice_native is offline   Reply With Quote
Old 04-09-2006, 03:53 PM   #3 (permalink)
BattleForums Senior Member
 
Dream_Walker's Avatar
 
Join Date: Feb 2005
Location: Arcanum
Age: 17
Posts: 1,901
Use an If/Then/Else function.

If
  • ((Bandit is alive) equal to True)
Then
  • Turn on MoneyGain
Quote:
Now, MoneyGain is a separate trigger that has the Event:
Event
  • Every 1 seconds of game time
---No Condition---
Actions
  • Add +1 to players gold count
Else
  • Turn off MoneyGain
__________________
(\_/)
(O.o)
(> <) Bunnies rule the world. Paste him in your sig for world domination!
Married to §tar§oft
:heart Krobelus :heart

Quote:
Originally Posted by §tar§oft
don't make me smother your face in my thousand year old pussy
Quote:
Originally Posted by Trojan
Because Jenny is like an unfiltered bottle of water. You want it, but once you see whats on the bottom, you go ewww.
Thanks to Hellwolf_36 for my avatars .
Dream_Walker is offline   Reply With Quote
Old 04-10-2006, 12:51 PM   #4 (permalink)
BattleForums Newbie
 
Join Date: Apr 2006
Posts: 10
The GoldGain trigger looks like this:

Event: Time - Every 60 seconds of game time
Actions: Player - Add 20 to (Matching player) Current Gold

The Bandit trigger looks like this:

If - (Unit-type of triggering unit equal to Bandit)
Then do (Turn on Goldgain)
Else do (Turn of Goldgain)

I dont know what I shall write in the "If" part of the trigger, casus I cant find anything that says "((Bandit is alive) equal to true)
Is it correct to set "Matching Player" in the Goldgain trigger? Shall it be "Owner of triggering unit" instead?
Thanks for the help so far, by the way
Hanz is offline   Reply With Quote
Old 04-11-2006, 04:37 AM   #5 (permalink)
Aya Matsuura is awesome
 
x42bn6's Avatar
 
Join Date: Nov 2002
Location: Trieste, Friuli-Venezia Giulia
Age: 20
Posts: 14,942
Quote:
Originally Posted by Hanz
The GoldGain trigger looks like this:

Event: Time - Every 60 seconds of game time
Actions: Player - Add 20 to (Matching player) Current Gold

The Bandit trigger looks like this:

If - (Unit-type of triggering unit equal to Bandit)
Then do (Turn on Goldgain)
Else do (Turn of Goldgain)

I dont know what I shall write in the "If" part of the trigger, casus I cant find anything that says "((Bandit is alive) equal to true)
Is it correct to set "Matching Player" in the Goldgain trigger? Shall it be "Owner of triggering unit" instead?
Thanks for the help so far, by the way
No, because there is no unit triggering the trigger in the Event section.

Use Pick every Player in game (or something like that) and Unit of Picked Player instead of Unit of Matching Player or Unit of Triggering Player.*
__________________
* Hang on a second...

Diablo III has been announced!

Here's what you need to do: Register a new account and tell the world what you think of this game.

Tell the damned world. The world wants to know.
x42bn6 is online now   Reply With Quote
Old 04-11-2006, 07:23 AM   #6 (permalink)
BattleForums Newbie
 
Join Date: Apr 2006
Posts: 10
Oh okey, thanks!
But what about this part?

The Bandit trigger looks like this:

If - (Unit-type of triggering unit equal to Bandit)
Then do (Turn on Goldgain)
Else do (Turn of Goldgain)

Is it correct?

Heee... Now the trigger works, but it only gives me 20 Gold every minute, no matter how many Bandits I have...

Last edited by Hanz; 04-11-2006 at 09:33 AM. Reason: Automerged Doublepost
Hanz is offline   Reply With Quote
Old 04-11-2006, 04:54 PM   #7 (permalink)
[F-Zero Fanatic]
 
Chris's Avatar
 
Join Date: May 2003
Location: Phantom Road
Age: 22
Posts: 15,155
If you want to control via how many bandits there are, here is waht you do.

Keep a variable that stores the number of bandits on the field. Then where it says 20 gold, multiply the variable with the bandit count by the 20.
__________________


The Purpose of DTD is not to show off how good you are.
But to do an insane flying move and landing at 3000 km/h.
Hopefully, without crashing into something or flying off in the process.

F-Zero Forever!

One of Wrestlemania 24's Epic Moments

Chris is online now   Reply With Quote
Old 04-14-2006, 09:48 AM   #8 (permalink)
BattleForums Newbie
 
Join Date: Apr 2006
Posts: 10
Okey humble people, my triggers looks like this:

Trigger number 1: "Bandit GoldGain"

Event: Time - Every 60 seconds of game time
Condition: None
Actions:

Player - Add 20 to (Picked player) Current Gold
Player group - Pick every player in (All players) and do (Do nothing)


Trigger number 2: "Bandit Goldtrigger"

Event: None
Condition: None
Actions: If (All conditions are True) then do (Then actions) else do (Else actions)

If - conditions:

((Mathing unit) is Alive) Equal to True
(Unit-type of (Triggering unit) Equal to Bandit)

Then - Actions: Trigger - Turn on Bandit GoldGain <gen>

Else - Actions: Trigger - Turn off Bandit Goldgain <gen>

Thats it. I know this is not right, but I am not so good at triggering... yet.
I know how to create Variables but I dont know what I shall do with it. In fact, there is a lot of things I dont know.
Anyways, my goal with those triggers is to make a unit named "Bandit" on my map. For each Bandit a player controlls 20 Gold will be added to his treasury every 60 seconds. So if I have 10 Bandits I will recieve 200 Gold every minute. And all players are able to build Bandits, so the more Bandits you have the more Gold you get...

So all corrections are welcome, and please show the exact triggers.
Thanks for all help I've had so far!

Last edited by Hanz; 04-14-2006 at 09:52 AM.
Hanz is offline   Reply With Quote
Old 04-14-2006, 01:54 PM   #9 (permalink)
I still play games
 
Join Date: Nov 2003
Posts: 1,692
Here you go if you want the gold to be distrubuted to all players:
Bandit Count
Events
Unit - A unit enters (Playable map area)
Conditions
(Unit-type of (Triggering unit)) Equal to Bandit
Actions
Set banditnumber //create this as an integer variable// = (banditnumber + 1)
Trigger - Turn on Gold <gen>


Gold (Initially off)
Events
Time - Every 60.00 seconds of game time
Conditions
Actions
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
banditnumber Greater than or equal to 1
Then - Actions
Player Group - Pick every player in (All players) and do (Actions)
Loop - Actions
Player - Add (20 x banditnumber) to (Picked player) Current gold
Else - Actions
Trigger - Turn off (This trigger)


Bandit Dies
Events
Unit - A unit Dies
Conditions
(Unit-type of (Triggering unit)) Equal to Bandit
Actions
Set banditnumber = (banditnumber - 1)

Last edited by Octopor; 04-14-2006 at 02:20 PM.
Octopor is offline   Reply With Quote
Old 04-14-2006, 10:03 PM   #10 (permalink)
Aya Matsuura is awesome
 
x42bn6's Avatar
 
Join Date: Nov 2002
Location: Trieste, Friuli-Venezia Giulia
Age: 20
Posts: 14,942
What are these for?
((Matching unit) is Alive) Equal to True
(Unit-type of (Triggering unit) Equal to Bandit)
More importantly, what is the Event? It can't be a Unit dying, because you are asking if a Unit is alive. And you are using Matching Unit and Triggering Unit... You cannot use either.

Matching Unit refers to a condition.
Picked Unit refers to a Unit picked by a Pick... Action.
Triggering Unit refers to the Unit that is in question in Event.*
__________________
* Hang on a second...

Diablo III has been announced!

Here's what you need to do: Register a new account and tell the world what you think of this game.

Tell the damned world. The world wants to know.
x42bn6 is online now   Reply With Quote
Old 04-15-2006, 09:27 PM   #11 (permalink)
I still play games
 
Join Date: Nov 2003
Posts: 1,692
Just use my trigger, it works perfectly.
Octopor is offline   Reply With Quote
Old 04-18-2006, 08:52 AM   #12 (permalink)
BattleForums Newbie
 
Join Date: Apr 2006
Posts: 10
After a lot of klicking my trigger looks exactly like yours, but still something is not working. I always get 40 gold every minute, no matter how many bandits I have. I think the variable is the problem. I created an Integer Variable as you said, and I even named it to "Banditnumber".
I thought of this:

Quote:
Originally Posted by Hellwolf_36
If you want to control via how many bandits there are, here is waht you do.

Keep a variable that stores the number of bandits on the field. Then where it says 20 gold, multiply the variable with the bandit count by the 20.
But how does my variable know how many Bandits there are? The variable requires a set number. For example, I have to write "5" or "7" or something in the fields. Although I didn't change anything in the fields, so all says 0. And I assume that the number in the variable will multiplie with the 20 Gold added every 60 seconds...
Well, as you notice I have never used variables before, cause I always make simple triggers.

And once again, thanks for all help so far! I really appreciate it!

Last edited by Hanz; 04-18-2006 at 09:03 AM.
Hanz is offline   Reply With Quote
Old 04-18-2006, 07:02 PM   #13 (permalink)
I still play games
 
Join Date: Nov 2003
Posts: 1,692
Here I'll post my map for you.
Attached Files
File Type: w3x lolmap.w3x (17.2 KB, 2 views)
Octopor is offline   Reply With Quote
Old 04-20-2006, 11:19 AM   #14 (permalink)
BattleForums Newbie
 
Join Date: Apr 2006
Posts: 10
Now I've looked at your map and I found out what was wrong on my map. The Bandits are actually upgraded from Peons via the Bear-form ability. When I changed the trigger so every Peon generated Gold instead of the Bandits, it worked perfectly.
So I was wondering how I shall do with the Bandits then? Will I just have to make Bandits be trained at regular barracks or can I in any way make then generate gold when upgraded? That would be sweet...

Oh, and one last dumb question from me:

Quote:
Originally Posted by §tar§oft
Here you go if you want the gold to be distrubuted to all players:
Does that mean that ALL players get gold from Bandits whoever controlls them? Or does it mean that if I have 5 bandits I will get 100 gold every minute, and player 2 has 10 Bandits he will get 200 Gold every minute...
Hanz is offline   Reply With Quote
Old 04-20-2006, 11:23 AM   #15 (permalink)
[F-Zero Fanatic]
 
Chris's Avatar
 
Join Date: May 2003
Location: Phantom Road
Age: 22
Posts: 15,155
You would need an array controlling the number of bandits each player has instead of a flat variable.
__________________


The Purpose of DTD is not to show off how good you are.
But to do an insane flying move and landing at 3000 km/h.
Hopefully, without crashing into something or flying off in the process.

F-Zero Forever!

One of Wrestlemania 24's Epic Moments

Chris is online now   Reply With Quote
Old 04-21-2006, 08:28 AM   #16 (permalink)
BattleForums Newbie
 
Join Date: Apr 2006
Posts: 10
Quote:
Originally Posted by Hellwolf_36
You would need an array controlling the number of bandits each player has instead of a flat variable.
Which variable should I use? I tried an Unit-Variable and selected Bandit as unit-type, but it didn't really work.
Hanz is offline   Reply With Quote
Old 04-21-2006, 11:35 AM   #17 (permalink)
[F-Zero Fanatic]
 
Chris's Avatar
 
Join Date: May 2003
Location: Phantom Road
Age: 22
Posts: 15,155
You need a numeric array to store the number of bandits. You only use an unit variable array if you want to say:

-Keep track of what hero each guy has
-Blueprints for a Random Hero trigger
-Or some building that each player needs to survive with.
__________________


The Purpose of DTD is not to show off how good you are.
But to do an insane flying move and landing at 3000 km/h.
Hopefully, without crashing into something or flying off in the process.

F-Zero Forever!

One of Wrestlemania 24's Epic Moments

Chris is online now   Reply With Quote
Old 04-25-2006, 06:11 PM   #18 (permalink)
I still play games
 
Join Date: Nov 2003
Posts: 1,692
Quote:
Originally Posted by Hanz
Does that mean that ALL players get gold from Bandits whoever controlls them? Or does it mean that if I have 5 bandits I will get 100 gold every minute, and player 2 has 10 Bandits he will get 200 Gold every minute...
It means that the ammount of Bandits in the map will be added to the same variable, therefore all players will get the same ammount of gold.

I can post the map with the trigger for players to only get the ammount of gold they would get corresponding to the ammount of bandits that they control.

(ex.

Player 1 has 2 bandits so he'd get 40 gold per minute
but Player 2 has 5 bandits so he'd get 100 gold per minute)

I only made the triggers for 4 people, but you can see what I changed, and I made 8 variables for you since you seem to have trouble with them. (you can also just make an interger array for the bandits like hellwolf said or have the variables all made seperately)
Attached Files
File Type: w3x banditmapstarsoft.w3x (19.8 KB, 0 views)

Last edited by Octopor; 04-25-2006 at 06:31 PM.
Octopor is offline   Reply With Quote
Reply

« How i can make units walk on ship | Custom Hero maps how? as in picking abilitys »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


All times are GMT -4. The time now is 02:18 AM.



Powered by vBulletin® Version 3.7.2 | Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0