• 0

    posted a message on Custom Condition help

    You know if its i GUI you can select all and Copy as text then paste here between double <> , <code> </code> tags, even if its in galaxy it would somehow help because there is no way some one will read this.
    Btw tell us what you trying to achieve because this clearly looks like overdone

    Posted in: Triggers
  • 0

    posted a message on Current Wave
    Quote from Rubybeard: Go

    This is still a problem. Right now I have 51 wave triggers, each using a periodic event of .1 game seconds because I don't know how to force the game to check for the variable current wave otherwise. This causes MAJOR LAG in my map. I've tried figuring it out for myself but nothing seems to work.

    Well you could use array of waves on init something like
    Wave[1] = zerglings
    Wave[2] = archons
    etc. And than in 1 "spawner" kind of trigger use something like
    create unit Wave[current wave]
    You can also change 0.1 to something 0.5 . For human it wont make difference but for code its about 30% less (i believe minimal tick is 0.125? or is it 0.0125?)

    Posted in: Triggers
  • 0

    posted a message on Action that immobilizes a unit

    Set unit property - movement speed - 0 maybe than there is Reset movement speed :)

    Posted in: Triggers
  • 0

    posted a message on How can I tell who killed the unit?

    I see his issue. There is just "kill unit" and nothing like Deal damage from player or something. Well create custom action
    In action:
    parameter u unit
    parameter p player
    parameter x integer
    action:
    kill u
    give player p x money

    In you "kill trigger" with event "Player selects unit" do in actions
    custom action(Selected unit, Triggering player)

    I belive Selected unit is actually Unit group of Selected units so you may use "Unit from Unit Group(1, Selected Units)
    or do something like if player selects more than one you make Select unit (Unit from Unit Group(1, Selected Units)) and then run so it will prevent them from selecting multiple units at once

    Posted in: Triggers
  • 0

    posted a message on Trouble stopping a lava trigger need some advice

    Trigger - turn of trigger x you mean?

    its hard to guess like this you dont give details on what way stuff works in your triggers and people wont go read tutorial just to find out how possibly you did it

    Posted in: Triggers
  • 0

    posted a message on Is the "Any Player" option MPI?

    I remember something with caleed MUI meaning Multi-Instancable back in Wc3 times. Now i dont even care about it.
    Also it was the case if you used "Wait x" now you store player as p and your 100% sure it will work. All variables are locals now.

    But you get it wrong here. You still should store Things like "Triggering Player" "Last created unit" etc if you use waits. Probably similar precautions should be taken when you run action/function in new threads. On other hand forget about leaks unless threes is GUI option to destroy something you don't

    Posted in: Triggers
  • 0

    posted a message on String from bank length limit??

    Hello

    So i have this very long string in my bank,
    its saved to bank properly as i did view the file
    Atm string have around 3000 characters. If i load it to variable from bank it have 781 characters :/
    kinda low, very low (read lame)

            string = (Load key NK BKey of section NK BSec from bank Bank as a String) <String>
    

    Strings themselves can hold a lot more than this, so do bank strings. Seems like limit is in operation itself

    Posted in: Triggers
  • 0

    posted a message on Moving a region (with timer + XY)

    Idk its sound odd :p At first you need to understand how it works
    add debug after move region like

     UI - Display (Combine ("x = ", (Text((X of (Center of reg))) with 2 decimal places), " Y = ", (Text((Y of (Center of reg))) with 2 decimal places))) for (All players) to Debug area
    

    "x = " X of point (center of region(reg)) "y= " Y of point(center of region(reg))

    Check what values you get if Y is increasing over time it means you need to remove *-1 (this would be weird tho)
    if you say it moves UP probably Y with some odd reason will be increased over time instead of being decreased. Only thing that really do the work here is move region. Play with values there. adding *-1 to X offset for example will result in region moving from right to left

    Posted in: Triggers
  • 0

    posted a message on Moving a region (with timer + XY)

    Here it is nearly same working with map :)
    Btw. "Width of reg * Col" etc can be replaced in case you need bigger spaces with "(Width of reg + x) * Col". Also note that if you region is not square or circle Width and Height of reg can return some weird numebrs

        Events
            Timer - Elapsed time is 1.0 Game Time seconds
        Local Variables
            col = 0 <Integer>
            row = 0 <Integer>
            reg = Region 001 <Region>
            inpoint = (Center of reg) <Point>
        Conditions
        Actions
            Visibility - Create a visibility revealer for player 1 within (Entire map)
            ------- Switched col with row is only matter of trial and error
            General - For each integer row from 1 to 10 with increment 1, do (Actions)
                Actions
                    General - For each integer col from 1 to 10 with increment 1, do (Actions)
                        Actions
                            ------- Offset Y is *-1 this time since its moving down in this case (Negative Y offset)
                            Region - Move reg to (inpoint offset by (((Width of reg) * (Real(col))), (((Height of reg) * (Real(row))) * -1.0)))
                            ------- passing reg pos this way is more "sure", also you can pass anything you want so its more flexible
                            a(reg)
                            ------- Artifictial slow to see effects 1 by 1 otherwise it would be instant (filling)
                            General - Wait 0.5 Game Time seconds
    
    a
        Options: Action
        Return Type: (None)
        Parameters
            r = No Region <Region>
        Grammar Text: a(r)
        Hint Text: (None)
        Custom Script Code
        Local Variables
        Actions
            ------- do whatever
            Unit - Create 1 Capitol Statue for player 1 at (Center of r) using default facing (Ignore Placement)
            ------- for better visualization
            Camera - Pan the camera for player 1 to (Center of r) over 0.5 seconds with Existing Velocity% initial velocity, 10% deceleration, and Do Not use smart panning
            Ping - Ping the minimap at (Center of r) for (All players) over 0.5 seconds, using the color (0%, 100%, 0%)
    
    Posted in: Triggers
  • 0

    posted a message on Moving a region (with timer + XY)

    if i understand good (because you over explained) you want to move it in table like pattern. row, columns..

    Untitled Trigger 001
        Events
        Local Variables
            row = 0 <Integer>
            col = 0 <Integer>
            initial point = No Point <Point>
            region = No Region <Region>
        Conditions
        Actions
            Variable - Set initial point = (Center of region)
            General - For each integer row from 0 to Whatever with increment 1, do (Actions)
                Actions
                    General - For each integer col from 1 to 10 with increment 1, do (Actions)
                        Actions
                            Region - Move region to (initial point offset by (((Width of region) * (Real(col))), ((Height of region) * (Real(row)))))
                            General - Wait 2.0 Game Time seconds
    

    Haven't tested but should work. The move is move to point (point with offset(x,y))

    Posted in: Triggers
  • 0

    posted a message on [solved] Multiple Simultaneous Text Tags

    The way you speak about it seems you think like on one ever tried damage display. Everyone did :)

    If you have issues with it it most likely you approached it from wrong side. Post some code first so we can tinker it out

    usual way is like

    unit takes damage
    local tt - text tag
    create text tag
    set tt - last created
    /do fancy stuff with tt
    wait x
    destroy tt

    Posted in: Triggers
  • 0

    posted a message on [SLOVED] String searching...

    Hello I think i need little help here because i cant figure this out.

    Lets say i have

    1aa2bb3cc4bb1ad2aa3bb and so on

    As you can notice there are parts starting with 1x and ending right before another 1x. i need to extract characters after 4 (which is end of part) and before another 1
    So simply 1aa2bb3cc4 bb 1ad2aa3bb also main issue is that i dont know how many characters will extracting part have , but i know "1aa2bb3cc4" which is unique for every part.

    Edit: whoa i actually found a way sorry for bothering :)

    Posted in: Triggers
  • 0

    posted a message on How do I destroy all the buildings / bases on a map?
    Quote from DerNalia: Go

    @Chiquihuite: Go

    So... this is how I ended up doing it. I wish there was a more condense way... =(

            Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Required: Ground; Excluded: Uncommandable, with at most Any Amount) and do (Actions)
                Actions
                    Unit - Kill (Picked unit)
            Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Required: Air, with at most Any Amount) and do (Actions)
                Actions
                    Unit - Kill (Picked unit)
            Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Required: Structure; Excluded: Uncommandable, with at most Any Amount) and do (Actions)
                Actions
                    Unit - Kill (Picked unit)
            Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Required: Worker, with at most Any Amount) and do (Actions)
                Actions
                    Unit - Kill (Picked unit)
    

    you can check multiple filters

            Unit Group - Pick each unit in (Any units in (Entire map) owned by player Any Player matching Required: Air, Ground, Structure, Worker; Excluded: Missile, Uncommandable, Dead, with at most Any Amount) and do (Actions)
    
    Posted in: Galaxy Scripting
  • 0

    posted a message on Benefits by using Galaxy Scripting?
    Quote from HuggetSukker: Go

    Are there any things you can do with Galaxy scripting that you can't do in the trigger editor without custom script?

    Yes, if you go console-> type "browse", go -> view galaxy.natives you can learn that there are some functions which are not listed in GUI. Like for example somehow important (and "delicate in way it works") AddEventTrigger*,
    Also, in my opinion, it alot easier to edit any math stuff because you dont have to destroy whole formula if you want add something in front.

    Posted in: Galaxy Scripting
  • 0

    posted a message on Visual Shields, Terran or Zerg with Shields
    Quote from TacoManStan: Go

    Wow those were 2 huge necros

    Well issue still exists and people still view this so its good to post additional informations about the fix imo

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