• 0

    posted a message on How to attach a region to a unit and check if another unit enters that region?

    Hi,

    i want to check if a unit of a specific type (colossus, thor, ...) enters range of another unit (infestor). If so i want the infestor to cast neural parasite on that unit. The last part is easy, but i can't figure out how to check if a unit has entered the range of another unit. Maybe i finally need to learn the data editor to do this easily?

    Greetz Error Ash

    Posted in: Miscellaneous Development
  • 0

    posted a message on Question-How to check whether an integer is an even or odd number?

    Do you understand what it does? Cause it can be handy sometimes and is a rather basic thing that a programmer should know :)

    Posted in: Miscellaneous Development
  • 0

    posted a message on If-Then Scripting Help

    @RogueSniper: Go

    You should watch some video tutorials about basic triggers. I recommend http://www.youtube.com/user/GalaxyEditorTutorial#g/u and http://www.youtube.com/user/OneTwoSC#g/p

    You can do this very easily using triggers. Just run a periodic trigger every 0.2 or so seconds, pick each player in all players and check if the picked players player property minerals is greater than 10, and if so run the needed actions.

    If someone tells me how to copy paste triggers from the editor into this forum i can show you the exact trigger...

    Edit: Got it!

        Events
            Timer - Every 0.2 seconds of Game Time
        Local Variables
        Conditions
        Actions
            Player Group - Pick each player in (All players) and do (Actions)
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            (Player (Picked player) Minerals) <= 10
                        Then
                            Unit - Create 1 Zealot for player (Picked player) at Point using default facing (No Options)
                        Else
    
    Posted in: Galaxy Scripting
  • 0

    posted a message on force field corrupted

    I got the same problem right now. I haven't changed anything on the Force Field ability / behaviour / effect and on the sentry i only changed the energy regeneration rate. What is going on here? How did you fix it?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Way to make Creep Black?
    Quote from s3rius: Go

    ...

    There is no allied creep or enemy creep though.

    Just creep or not to creep - that's the question.

    Are you sure about this? I am 100% percent sure that i had it so that a Drone could only build buildings on creep "owned" by the player controling the drone. I don't know how i got it to work that way (it was unintendet and somehow i managed to remove it although i don't know how). It was not possible to build on creep owned by enemy or even allied players. I think maybe it had something to do with footprints so maybe this doesn't help the OP.

    Also, i think there were plans by Blizzard to make creep damage enemy buildings, but they removed it during alpha. Maybe the code is still in the game?

    Posted in: Miscellaneous Development
  • 0

    posted a message on Checking Conditions

    Two ideas:

    Either make a multiple if then else and check if an upgrade has already been researched and if so then find a random upgrade of the remaining ones.

    Or set a boolean array which contains data about if an upgrade has already been researched and put all those actions of your trigger into a while loop which checks if the randomly chosen upgrade is already researched (via the boolean array) and if so will loop again (continue...) before actually ordering the unit to upgrade.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Hardcore triggering...Connect the dots!

    @ctccromer: Go

    Pretty much what NeoDeathXp said. But i wonder, what is "a ds game"?

    Edit: Ahhhhhh, Nintendo DS, got it the second i clicked "reply" ^^

    Posted in: Miscellaneous Development
  • 0

    posted a message on Another noob trying to set teams..

    @LeetBox: Go

    That tutorial actually is right, you gotta press ctrl+d in the trigger editor, which will change the names of triggers from for example "Map Initilisation" into "TriggerAddEventMapInit()". I used that tutorial and it works.

    Also have a look at this: http://forums.sc2mapster.com/development/tutorials/2825-trigger-make-player-groups-from-teams/

    Posted in: Miscellaneous Development
  • 0

    posted a message on Worried about lag online: timers
    Quote from s3rius: Go

    @ErrorAsh: Go

    I have done some testing and discovered that everytime a trigger fires, the memory comsumption of SC2 goes up by a bit, but doesn't decrease anymore (like it is with local variables, for example). I think the memory generally increases by 4 bytes with every trigger call. This memory will only be cleared once you close the game, or maybe if you close the map, too.

    Having a 0.05-peroid trigger would eat about 5kb every minute. Now, that isn't very much, but with several low-peroid timers it adds up.

    One shouldn't absolutely panic because of that, but still - it's better to reduce the usage if you don't need it.

    How did you test? I just created a testmap with 200 copies of a trigger which fires 1000 times per second and contains an if then else statement which will always send a text message to all players. I let it run for 5 minutes and couldn't see an increase in memory usage but it should increase by:

    1000 triggers per second * 200 copies of the trigger *300 seconds * 4 Byte per trigger / 1024 / 1024 = 228MB

    But maybe copies of triggers are not handled as a whole new trigger? Or it isn't possible to fire a trigger 1000 times per second? Otherwise i am a bit surprised by the result, on the testmap there are also a shitload of units fighting and a didn't experience any lag at all, i thought something like this would consume more computer resources.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Worried about lag online: timers

    @s3rius: Go

    Can you explain why loops are performing better than timed triggers? Just curious :)

    Posted in: Miscellaneous Development
  • 0

    posted a message on Event How To: "If a change has occurred" ?

    At what times is it possible for a unit in your game to change owners? Maybe you can use a trigger to catch that event? Like when they can only change users if a certain ability is used or something.

    Otherwise i think i know a very complicated workaround, but i don't think it's really useful (would be laggy with lots of units)...

    Edit: Hehe, hddante beats me :) Actually that was the workaround i was thinking of, but for lots of units and a smal interval i don't know how it would perform, but i haven't that much experience in that matter.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Patrolling: can you limit it?

    I think it would work if you use the "Unit is Issued Order" event. Everytime the unit is issued a patrol command, you can:

    a) Override old patrol command by issuing the order to patrol to the spot the player clicked and instead of using "after existing orders" you use "replacing existing orders"

    b) Check if the clicked location is within a circle region around the triggering unit and if not, don't give the command or whatever

    Greetz
    Error Ash

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Solved] Creating a skill with Data Editor

    Ah, nice solution :)

    Posted in: Miscellaneous Development
  • 0

    posted a message on How to check if a unit is effected by an ability?

    Ahh, thank you very much!

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Solved] Creating a skill with Data Editor

    How did you do it?

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