HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Answer my queries please! :D

06-14-2009, 01:56 AM#1
hweiqiang
hi people.
i'm currently developing my map now.
and there are some questions i'd like to ask on 'how-to' triggers.

•How do i make a Income tower, where users get more IncomePerSecond when they build that tower,and lesser IncomePerSecond when they destroy/sell the tower?

•How do i make a DotA-alike creep system,whereby creeps spawn,walk forward and they will stop when they see an enemy unit?

•Will the size of the map be big if i insert a 4mb song into it? (e.g i insert a song thats 4mb,and my map size originally is 1.4mb. if i import it,will the map be 5.4mb?)

•How can i make a computer-controlled unit attack a unit thats not originally in the map, but spawned later in the game?



if you can,answer these question.
your help is greatly appreciated. :)
thanks !
06-14-2009, 09:12 AM#2
tamisrah
* Setup a trigger with a periodic timer event
that gives the player CountOfTowers*SomeGold gold per run.
To get the tower count you can either enum all towers of type each
time the trigger is run or make another trigger that counts the towers
created and destroyed
Hidden information:
Trigger:
Income
Collapse Events
Time - Every 2.00 seconds of game time
Conditions
Collapse Actions
Collapse Player Group - Pick every player in (All players) and do (Actions)
Collapse Loop - Actions
Player - Add CountOfTowers*SomeGold to (Picked player) Current Gold


* You have to place regions in the map that act as waypoints
you need triggers that send creeps if they enter a region towards the
next on your path with attack order
Hidden information:
Trigger:
Spawn
Collapse Events
Time - Every 2.00 seconds of game time
Conditions
Collapse Actions
Unit - Create 1 SomeUnit for SomePlayer at (Center of (1stWaypoint)) facing 0 degrees
Trigger:
Waypoint
Collapse Events
Unit - A unit enters 1stWaypoint
Conditions
Collapse Actions
Unit - Order (Triggering Unit) to Attack to (Center of (2ndWaypoint))


* Why would you want to add a 4mb song to it!?
(I have no idea on that topic, but I guess it will increase map size about
the size of the song because mpq probably can't compress the song any
further than it is already)

* If they're enemies, they will attack them as soon as they come in range.
But you can order them to attack units by triggers aswell:
Hidden information:
Trigger:
Unit - Order (SomeUnit) to Attack (SomeOtherUnit)


Hope I could help a little and good luck with your map
06-14-2009, 09:53 AM#3
hweiqiang
thats alot of help,thank you.
but i do have a quetion.


Events
Unit - A unit enters 1stWaypoint
Actions
Unit - Order (Triggering Unit) to Attack to (Center of (2ndWaypoint))

but if they were not engaging in 2ndwaypoint,and 2ndwaypoint was clear of enemies,and i they will move along given path if there are no enemies.
does the above trigger work for that?
06-14-2009, 10:18 AM#4
tamisrah
I'm not exactly sure about your question:
When there are no enemies around the attack order works the same as move order. If there are enemies the unit attacks them, maybe kills them and returns to the path.
06-14-2009, 10:56 AM#5
hweiqiang
Quote:
Originally Posted by tamisrah
I'm not exactly sure about your question:
When there are no enemies around the attack order works the same as move order. If there are enemies the unit attacks them, maybe kills them and returns to the path.

nevermind about that.
lol.
the CountTower*Money both of them are variables right?
06-14-2009, 02:55 PM#6
akolyt0r
if its a 4MB mp3 song, it will increase the size of the map by nearly 4MB aswell, since mp3 songs are already compressed.
Of course you can compress them further using a program like Audacity, but that decreases the sound quality of the song of course.
06-14-2009, 08:16 PM#7
tamisrah
Yes both of them are variables. CountTower is supposed to hold an integer count of all income increasing towers and Money represents the income per period one tower adds. (which is just a suggestion ofc)
06-15-2009, 03:55 AM#8
darkwulfv
Also, if you put a 4mb song into your map it pretty much means that people have to wait a long time extra to download a single song. And your map will probably breach B.net's filesize limit.

Quote:
•How do i make a DotA-alike creep system,whereby creeps spawn,walk forward and they will stop when they see an enemy unit?
...Attack move, perhaps? =/
06-15-2009, 10:47 AM#9
hweiqiang
Quote:
Originally Posted by tamisrah
Yes both of them are variables. CountTower is supposed to hold an integer count of all income increasing towers and Money represents the income per period one tower adds. (which is just a suggestion ofc)

any idea how can i do that? :S
06-15-2009, 01:56 PM#10
tamisrah
As already suggested
Solution 1: Enum all towers per player, set the variable to respective count
Solution 2: Detect all towers build with a trigger and if its an income tower
add one to the variable
Detect all towers destroyed and if its an income tower substract
one from the variable

The money variable is set at will by you, set it to some value so it is balanced to your prices.
06-16-2009, 10:24 AM#11
hweiqiang
Quote:
Originally Posted by tamisrah
As already suggested
Solution 1: Enum all towers per player, set the variable to respective count
Solution 2: Detect all towers build with a trigger and if its an income tower
add one to the variable
Detect all towers destroyed and if its an income tower substract
one from the variable

The money variable is set at will by you, set it to some value so it is balanced to your prices.

hey.
i'm sorry...i'm not trying to be arrogant but...
how do i set up the trigger.
as in,
actions,events,conditions? :/
06-17-2009, 10:21 AM#12
tamisrah
Well that's usually the point were you're politely advised to do something on your on first and not to expect others to do your work.

Hidden information:
Take a look at my first post, the rough layout for the trigger is presented there. The rest depends on what you want/need...
Event: is probably some periodic timer event
Conditions: is there any prerequisits to be met besides having an income tower?
Actions: well give the players the income they deserve!
06-18-2009, 09:07 AM#13
hweiqiang
Quote:
Originally Posted by tamisrah
Well that's usually the point were you're politely advised to do something on your on first and not to expect others to do your work.

Hidden information:
Take a look at my first post, the rough layout for the trigger is presented there. The rest depends on what you want/need...
Event: is probably some periodic timer event
Conditions: is there any prerequisits to be met besides having an income tower?
Actions: well give the players the income they deserve!

alot of help.
thanks.