• 0

    posted a message on Max hero per player

    @JanChris: Go

    Cool man thnx, in the future ill prolly be using more requirements. and thnx for the advanced examples it gives me good insight.

    cheers,

    Posted in: Triggers
  • 0

    posted a message on Max hero per player

    @JanChris: Go

    Hey, i have put the requirement to the train ability and it works perfectly. But doesnt this also affect the other players amount of heroes? because all players use like the same ability TrainRaynor , i mean like if i have 2 heroes the other player on my team cant build any heros anymore because there are already 2 heroes trained on the battlefield with that ability? or is it an individual requirement for each player?

    By applying the requirement to the train ability of the raynor unit i notice that i could only add 1 requirement, is it also possible to add multiple requirements to a train ability?

    Posted in: Triggers
  • 0

    posted a message on Max hero per player

    @Nerfpl: Go

    Hey man, i didnt really knew what you meant with the integer array but i got the other part of your solution and got it to work. Although it works, what i actually wanted was that the trigger only activates when a specific unit dies, else the trigger will be run a lot of senseless times because a lot of other units also die.

    HeroDie
        Events
            TriggerAddEventUnitDied(null)
        Local Variables
        Conditions
            Comparison((UnitGetType((EventUnit()))), ==, "Raynor")
        Actions
            IfThenElse()
                if
                    Comparison((PlayerGroupPlayer((GameAttributePlayersForTeam(1)), 1)), ==, (EventPlayer()))
                then
                    IncrementInteger(maxP1, -, 1)
                    TechTreeAbilityAllow((EventPlayer()), "TrainRaynor", 0, true)
                else
    
    Posted in: Triggers
  • 0

    posted a message on Max hero per player

    sup ppl,

    I have a problem with setting something up like the max amount of heroes that a player can have. I didnt really had a clue what to use but i made a silly trigger which kinda works.

    - 3players on 1 team. - 1 shared building to buy heroes. - building changes owner when clicked. - trainability is the same for each player.

    I have set up a var like MaxP1 which contains the maxamount of heroes which gets increased by 1 for a certain player once he uses the train ability as you can see in trigger below.

    The problem is not this trigger, but now im trying to make a trigger which will decrease the maxhero by 1 if the trained hero of a specified player dies so that he can train the ability again for example: if he had 2 heroes and 1 dies.

    help is appreciated :]

    MaxHero
        Events
            TriggerAddEventUnitAbility((EventUnitTargetUnit()), "TrainRaynor", 0, c_unitAbilStageExecute, false)
        Local Variables
        Conditions
        Actions
            IfThenElse()
                if
                    Comparison((PlayerGroupPlayer((GameAttributePlayersForTeam(1)), 1)), ==, (EventPlayer()))
                then
                    IncrementInteger(maxP1, +, 1)
                else
            IfThenElse()
                if
                    Comparison(maxP1, >=, 2)
                then
                    TechTreeAbilityAllow((EventPlayer()), "TrainRaynor", 0, false)
                else
    
    Posted in: Triggers
  • 0

    posted a message on Team structure

    @LaxSalmon: Go

    Ahh thnx man, "cannot be clicked" was flagged , i put it off so now it works :]

    Posted in: Triggers
  • 0

    posted a message on Team structure

    @LaxSalmon: Go

    Hey is was just testing if the trigger even runs but it does nothing when i click the biodome, i dont get the display message, i also tried setting it to another structur but that wouldnt help either. Whats wrong with the event? why doesnt the message trigger when i click the building?

    BioDome
        Events
            Unit Selection - Colonist Bio-Dome [69.50, 81.50] is clicked by Player Any Player
        Local Variables
        Conditions
        Actions
            UI - Display "THIS IS THE BIODOME" for (All players) to Subtitle area
            Unit - Hide the TrainRaynor ability for (Triggering unit)
    
    Posted in: Triggers
  • 0

    posted a message on Team structure

    Anyone who can help me? is the question too stupid?

    Posted in: Triggers
  • 0

    posted a message on [Misc] Text Styles (75% done)

    @MaNtEc0r: Go

    Hey,

    I was wondering if the printed text is a variable integer, possible to apply style to that?

    Posted in: Tutorials
  • 0

    posted a message on Team structure

    Hey people,

    I was creating a structure for each team where a player of a certain team can buy a hero. So i created an if statement which says if player is on team 1==true > structure show abilities for triggerd player. Anyhow i dont know what event to use, i first tried owner changing when a building is clicked, but in the event i cant reference that specific building and then it goes for all buildings, can i reference an event to this specific building being clicked?

    pre thanks :)

    Rice

    Posted in: Triggers
  • 0

    posted a message on Ability bound to region?

    @SouLCarveRR: Go

    are you calling me an idiot? :p

    Posted in: Triggers
  • 0

    posted a message on Ability bound to region?

    @Nerfpl: Go

    hey, although it isnt the way i fixed it, yeh the flags were set for uninterruptible and also cancel was flagged, i removed all flags, adjusted some other data, tested a few times and it wouldnt work. Now i have tested some more other functions and i got 1 to work although it looks a bit sloppy :ppp

    again thx for the help, its greatly appreciated!

    for anyone who ever needs it:

    NukeInRegion
        Events
            Unit - (Triggering ability target unit) uses Ghost - Tac Nuke Strike at Morph01 - Approach stage (Ignore shared abilities)
        Local Variables
        Conditions
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    ((Triggering ability target point) is in nuketeam1) == True
                Then
                Else
                    Tech Tree - Disallow the Ghost - Tac Nuke Strike ability for player (Triggering player)
                    General - Wait 2.0 Game Time seconds
                    Tech Tree - Allow the Ghost - Tac Nuke Strike ability for player (Triggering player)
    
    Posted in: Triggers
  • 0

    posted a message on Ability bound to region?

    @Nerfpl: Go

    hey,after i saw the repost of the thing i couldnt find i pushed on and eventually found out how to get the point target is in region to work but it was actually pointtargetcontains region if you want to find it in the function list. Anyways i tested it with messages so it work. Now for the ability to stop while its casting is still a problem, anyone know how to fix this?

    NukeInRegion
        Events
            Unit - (Triggering ability target unit) uses Ghost - Tac Nuke Strike at Effect3 - Cast stage (Ignore shared abilities)
        Local Variables
        Conditions
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    ((Triggering ability target point) is in nuketeam1) == True
                Then
                    UI - Display "Target ability point = in region" for (All players) to Chat area
                Else
                    Unit - Cancel progress bar of ((Triggering ability target unit)) slot (Current level for ability (Ability of Ghost - Tac Nuke Strike) on (Triggering unit)) 
                    UI - Display "Target ability point = not in regio..." for (All players) to Chat area
    
    Posted in: Triggers
  • 0

    posted a message on Ability bound to region?

    @SouLCarveRR: Go

    Hey, im getting really confused...i cant set target point of ability is in region which you specified i should put in the if statement, if been searching for ages, there is no action like that. Ive also been searching trough every function to stop an ability or stop actions for a specified unit, or stop and ability while the triggerd unit is casting, Ive tried to disable the ability in code below, but that doesnt work, i also tried it without the if statement. As you can see below i also tried using a condition comparing the abilitytriggiring target point to something liek "targetpoint ability used in region" but nothing like that exists

    im loooost please help :[

    NukeInRegion
        Events
            TriggerAddEventUnitAbility((EventUnitTargetUnit()), "TacNukeStrike", 0, c_unitAbilStageExecute, false)
        Local Variables
        Conditions
        Actions
            IfThenElse()
                if
                    Comparison((EventUnitTargetPoint()), ==, (RegionGetBoundsMax(r)))
                then
                else
                    UnitAbilityEnable((EventUnitTargetUnit()), (AbilityCommandGetAbility("TacNukeStrike", 0)), false)
    
    Posted in: Triggers
  • 0

    posted a message on Ability bound to region?

    @Nerfpl: Go

    HEy, thnx for the reply again.

    After i read what you said i came up with the code down below. I dont know if its good at all, i couldnt select the region i made, i could only set XYZ for the region. Maybe im using wrong functions, i just scrolled through the list and picked what made most sense. And i dont know what to do like disable the unit ability for 2 secs? I feel kinda embaressed for what i tried here ^ ^ Help is neccessary! :(

    i also dont know when i disable the ability why cant i choose the ability itself only the "index command"?!??

    NukeInRegion
        Events
            Unit - Any Unit uses Ghost - Tac Nuke Strike at Morph09 - Facing Start stage (Ignore shared abilities)
        Local Variables
        Conditions
        Actions
            General - If (Conditions) then do (Actions) else do (Actions)
                If
                    ((Triggering ability target point) is in (Region((Point(0.0, 0.0)), 1.0))) == False
                Then
                    Unit - Disable the ((Picked unit) ability (Index of Ghost - Tac Nuke Strike)) ability for (Triggering unit)
                Else
            General - Wait 2.0 Game Time seconds
            Unit - Enable the ((Picked unit) ability (Index of Ghost - Tac Nuke Strike)) ability for (Triggering unit)
    
    Posted in: Triggers
  • 0

    posted a message on Ability bound to region?

    Hey, back with antoher question :]

    So in my game each player has a nuke to throw down when things get messy... The ability can be placed on any location on the map atm where you have visibility, i was wondering if i could make like a region on the map and you would only be able to plant the nuke within the specified region. Is it possible?

    greets

    Posted in: Triggers
  • To post a comment, please or register a new account.