Questions w/ quirks.

K

Korsen

Guest
EDIT: Current problems will be listed above the dotted line Order of Importance:
For every 5 seconds an enemy unit is in a region, spawn ONE (maybe two) marine at base. I need code for it. I tried twice and it just aint happenin. This trigger needs to be enabled by 5 enemy players but again, spawn only one (maybe two) units. If one or all 5 players enter the region, i need just one or two to spawn.

I have pinging triggers setup so that when an enemy unit enters a region, the map is pinged and text is displayed stating something. My trigger is SUPPOSED to wait 360 seconds at the end, but it triggers anytime a new unit enters. I need it so that once any unit from the 5 enemy players enters the region, it is pinged ONCE for the next 30 seconds to 1 minute.

I need to make a circle of power that when a hero steps inside, they are entitled to 1 of 3 (or more) upgrades (from a menu) for every 5 (or more) levels they achieve, and if they enter the circle again without having another 5 levels, they are denied the menu. It needs to be for 5 players and denied the other 5.

I need to combine items in a player's inventory plain and simple.

I need to stop all triggers associated with a region should a particular building die (building death will not trigger win/lose condition(s)) if there's any simple way of going about it.

I need to know how to research abilities for a computer ally and then have it use that ability once i've researched it for itself. i.e.: I research Sorceress Master Rank, sorceresses start using fireballs.

[This isn't a problem but really i'm just curious. If anyone has the time i'd like to know how to give spells a %chance to backfire in which it would either target the caster or reverse it's direction/change allegiance etc. I.e.: fireball casts on casting sorceress/serpent wards summon under enemy allegiance/carrion swarm targets friendlies in opposite direction of casting etc. That would be really cool.]

EDIT: If anyone could just a well post a good link referring to my problemos that'd be good too.
--------------------------------------------------------------------------


Greets forum! I've just started my AOS map today and i've done well so far :] However! Here are my problems, and mind you i'm fairly intelligent with the common overlooks every map maker has :p

1: My tower and catapaults are splashing friendlies despite me setting AOE and Targets Allowed to only Enemy, Not-Self. WTF?

2: I setup a region to spawn a unit should a enemy unit enter the region, but when i test it, nothing happens.
Code:
Unit - A unit enters Left 1 Ping 2 <gen>
(Triggering player) Equal to Player 3 (Teal)
Unit - Create 1 Marine for Player 9 (Gray) at (Center of Left 1 Spawn <gen>) facing Default building facing degrees
Wait 5.00 seconds
WTF? (I need this to trigger every time an enemy player's units enter a region)

3: Mind giving me a very basic tutorial to add %chance to drop #items on regular units? Or is that easy enough? (I've simply not looked into it but if anyone feels generous i'd appreciate it!)

4: I want to have any player on my team view an allied building and research an upgrade from that building that will affect my allied computer player's units only. Help?

If anyone wants to play it when i've finished send me a PM. ATM it's 128x96 but if this map is successful performance-wise at it's end i plan on upgrading it to 192x128 possibly. +REP for helpful answers (which is so easy :p) PS: This is going to be large scale and hardcore SC style back to ye olde days of the Gunner4Ever versions which i cannot find anymore *weep*. I refuse to create a cold pile of [poop] dota wannabe AOS.
 

Zeromatter

New Member
Reaction score
20
2. Use "owner of triggering unit". (Or "entering unit", but I think triggering unit is faster.

3.

Event: Unit dies
Condition: Unit type of dying unit = whatever
Actions: if random integer 1 to 100 less than or equal to X
then: create 1 itemWhatever at location of dying unit
else: do nothing

yes it leaks, but oh well. The X is the percentage chance. X=10 is 10%, X=41 is 41%'

I'm tired, so if no one answers the rest of your Q's, maybe I'll eventually get around to them.
 
K

Korsen

Guest
ok so you fixed my problem of the unit spawning when the enemy enters a region, but now i need it to summon the unit for as long as there is enemy in the region. I set it to triggering unit and it did spawn the unit, but only once while i left my unit in hold position.

Oh and by the way, if i set the conditions to include 5 lines of code representing each player, will the unit spawn if any of those conditions are met? Or must all of them be met in order for it to trigger?
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
Conditions are "and" by nature.
All of them must be true.

However, there is a "Or - Multiple conditions" to work around that "problem".



Event:
- A unit finishes research
Conditions:
Pick every player in All allies of (Owner of (Triggering unit)) and do
- Player - Set current research level of (Researched tech-type) to (Level of (Researched tech-type) of (Owner of (Triggering unit))) for (Picked player)
 
K

Korsen

Guest
ok thanks a bunch, that optimises my triggers by quite a bit.

However that nagging friendly splashing issue is bugging me.

Also, while the research info is useful, i still need to have all players go to one building instead of creating one building for each player to do so. something like in the TGS/EotA/SC vs WC maps where all players on a team can go to a building to buy an additional unit to spawn in a lane. Come to think of it, that's what i need to do - currently i have the purchase of one unit spawning in all 4 of my lanes and i'd like to get them to spawn in the lane of the respective building it was purchased at. <= i'm sure i can do that on my own but if i can't i'll let you know.
 
K

Korsen

Guest
ok cool you fixed my splash problem :D
So far this is what i need help with doing:

I've fixed the marine to spawn whenever an enemy unit enters a region, but since i've added %drops on death, if there's a drop leftover in that region, the marine spawns until the drop is removed. How do i fix this? I've looked at the triggers and am stumped. Exact code is appreciated here.

I need to fix mapwide XP gains so that heroes only gain xp for things they kill. Setting the heroes maximum Xp gain range in constants to 0 DOES NOTHING. and it irritates the hell outta me. Otherwise i'd prefferably like to have heroes gain XP from friendly kills within about 3-500 range. How do i fix this?

I need to add a circle of power that when a hero enters it, for every 5 levels that hero has gained, when the hero enters the circle a small menu appears asking it does it want upgrade 1, 2, or 3? And obviously upon pressing, it applies the chosen upgrade. If the hero is say level 12, and has used both offered upgrades and tries to use a third, it will be denied. How do i create such a thing? (I can do the circle of power and the region on my own).

How do i change the armor increase values for the upgrade? Or am i doomed to +2 armor per upgrade?
 

Tom Jones

N/A
Reaction score
437
>I need to fix mapwide XP gains so that heroes only gain xp for things they kill. Setting the heroes maximum Xp gain range in constants to 0 DOES NOTHING. and it irritates the hell outta me. Otherwise i'd prefferably like to have heroes gain XP from friendly kills within about 3-500 range. How do i fix this?

Set it to 100.
 
K

Korsen

Guest
it's a 128x96 map, no matter what i set it to all heroes gain xp no matter where they are. i need to fix that. even at 0 range they gain freaking xp halfway across the map.
 
K

Korsen

Guest
ok cool that should do it for that one. thanks.

now to get the rest of my crap fixed/done... (bringing current issues to the bottom)

I've fixed the marine to spawn whenever an enemy unit enters a region, but since i've added %drops on death, if there's a drop leftover in that region, the marine spawns until the drop is removed. I need the marine to spawn only when a *UNIT* is present in the region... maybe i should just tweak my trigger a bit? How do i fix this? I've looked at the triggers and am stumped. Exact code is appreciated here.

I need to add a circle of power that when a hero enters it, for every 5 levels that hero has gained, when the hero enters the circle a small menu appears asking it does it want upgrade 1, 2, or 3? And obviously upon pressing, it applies the chosen upgrade. If the hero is say level 12, and has used both offered upgrades and tries to use a third, it will be denied. How do i create such a thing? (I can do the circle of power and the region on my own).

How do i change the armor increase values for the upgrade? Or am i doomed to +2 armor per upgrade?
 

Zeromatter

New Member
Reaction score
20
1. In actuality, it's not the drop that triggers your...um...trigger. A dead unit is still condisered a unit, for all purposes. It's just dead. Add a boolean condition: "unit yourUnit is dead = true." This way, the trigger will only fire when an ALIVE unit is in the region.

(I don't know your exact trigger, if you can post it I can customize the above condition to fit it. Or some one else could!)
 
K

Korsen

Guest
Nevermind changing the armor increase question ^_^ nooby overlook on my part. Found it under combat 2 stats... >_>

anyway here it is:
[Left 1 On]

Events
Unit - A unit enters Left 1 Ping 2 <gen> (Last of it's kind in the lane before a base)

Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 10 (Light Blue)
(Owner of (Triggering unit)) Equal to Player 7 (Green)
(Owner of (Triggering unit)) Equal to Player 6 (Orange)
(Owner of (Triggering unit)) Equal to Player 5 (Yellow)
(Owner of (Triggering unit)) Equal to Player 3 (Teal)

Actions
Trigger - Turn on Left 1 <gen> (which turns on the unit summon)

-------------------------------------------------------------------------
[Left 1 Off]

Events
Unit - A unit leaves Left 1 Ping 2 <gen>

Conditions
Or - Any (Conditions) are true
Conditions
(Owner of (Triggering unit)) Equal to Player 10 (Light Blue)
(Owner of (Triggering unit)) Equal to Player 7 (Green)
(Owner of (Triggering unit)) Equal to Player 6 (Orange)
(Owner of (Triggering unit)) Equal to Player 5 (Yellow)
(Owner of (Triggering unit)) Equal to Player 3 (Teal)

Actions
Trigger - Turn off Left 1 <gen>

------------------------------------------------------------------

If we could simplify this so i could have it on one trigger that turns on the unit spawn as long as there's a unit in the region (and turns off/stops spawning when there isn't) that'd be sweeet. I've got a boatload of triggers in my map as it is and i think i need to cut down on some of them for performance. If you want to play my map with me my handle is Korsen@Azeroth

PS: I have bones set to hang around for only 1 second and i'm thinking of modding all death animation times for spawned units to 1/0 seconds to cut down on bodies :p
 

Zeromatter

New Member
Reaction score
20
Okay. You are going to have a multitude of problems with that trigger. Lets say you have 2 footmen, and you move footman1 into the region, thus turning on the spawns. You move footman2 into the region, and the spawns turn on again (Doing nothing, just turning on an already on trigger). But lets say you move footman1 out of the region. Boom, the spawns turn off. I'm pretty sure this isn't what you intended.

Trigger 1
Events: Every X seconds
Conditions: number of units in yourRegion matching (matching unit is alive =true) >0
Actions: Create X units of type Z at yourRegion

So every X seconds, (The time between your spawns) this trigger will check to see how many ALIVE units are in the region. If that number is >0 (Which means that there is an alive unit in the region) then creeps will spawn. If not, nothing will happen.

Hope that helped.
 
K

Korsen

Guest
lol very much so thank you. eliminated about 16 of my triggers ^_^ you should look at my entire map lol i have 10 folders worth of triggers.

mind elaborating on the condition though? i'm having trouble making it :p

And i must elaborate on what i want for this trigger:
Your right for the most part, but i need it to enable when any unit from 5 players (that are alive :p) enters that region. (Not just to see if there is a live unit there. otherwise it will spawn for tripping itself)

This is all i could make of your instructions, which i'm not positive will work:

Events
Time - Every 5.00 seconds of game time

Conditions
----And - All (Conditions) are true
--------Conditions
---------((Triggering unit) is alive) Equal to True
---------(Left 1 Ping 2 <gen> contains (Triggering unit)) Equal to True
---------Or - Any (Conditions) are true
-----------Conditions
--------------(Owner of (Triggering unit)) Equal to Player 1 (Red)
--------------(Owner of (Triggering unit)) Equal to Player 2 (Blue)
--------------(Owner of (Triggering unit)) Equal to Player 4 (Purple)
--------------(Owner of (Triggering unit)) Equal to Player 9 (Gray)
--------------(Owner of (Triggering unit)) Equal to Player 11 (Dark Green)

Actions
Unit - Create 1 Marine for Player 9 (Gray) at (Center of Left 1 Spawn <gen>) facing Default building facing degrees

lol is it so simple that all i have to do is add in the events: Unit enters region? lol
but in that case, if that was all i needed, i could get rid of the second condition right?

PS: Is there also a way so that when a specific building on the map is destroyed, all triggers involving a region are stopped OR the region is removed from play?
 

Zeromatter

New Member
Reaction score
20
Events: Every X seconds

Code:
Unit Group - Pick every unit in (Units in yourRegion <gen>) and do (Actions)
    Loop - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                ((Picked unit) is alive) Equal to True
                Or - Any (Conditions) are true
                    Conditions
                        (Owner of (Picked unit)) Equal to Player 1 (Red)
                        (Owner of (Picked unit)) Equal to Player 2 (Blue)
                        (Owner of (Picked unit)) Equal to Player 3 (Teal)
                        (Owner of (Picked unit)) Equal to Player 4 (Purple)
                        (Owner of (Picked unit)) Equal to Player 5 (Yellow)
            Then - Actions
                Set unitinRegion = True
            Else - Actions
                Do nothing
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
    If - Conditions
        unitinRegion Equal to True
    Then - Actions
        Unit - Create 1 Footman for Neutral Passive at (Center of yourRegion <gen>) facing Default building facing degrees
    Else - Actions
        Do nothing


I'm pretty sure this works. However, I'm not sure if this is the most effective way to do this.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top