• 0

    posted a message on [Solved] Storing Points with a random ID

    @SouLCarveRR: Go

    Oh I feel like a fool lol. I tried every combination around that I could think of EXCEPT •if TempDistance < TempClosestPoint[1] . I had it with [i] and it didn't give an error, oh well thats tiredness and working out how things work.

    on a scale of 1-10 id say I understood your logic there at about an 8.5ish, I managed to see how everything went along pretty well but I'd say I just got confused and frustrated with the total procedure and then worried about it not working and ruining the whole shebang lol. For all off the top of your head it was pretty spot on.

    I didn't understand what you meant with the spawn timer trigger.

    Quote from SouLCarveRR: Go

    NydusPointActive[0-5](type:boolean) Spawn Timer Trigger events Periodic 20 seconds actions Random Spawn Function(-1) Random Spawn Function(Type:Action Return:none) parameters ForcePointIndex(type:integer) this is so you can pass a specific index to create nydus at variables TempRan (type:integer) = no point i (type:integer) actions If ForcePointIndex = -1 Set TempRan = random integer between 0 - MaxArrayIndex else Set TempRan = ForcePointIndex if NydusPointActive[TempRan] = true 'this is aninvalid point do nothing else Create Unit NydusCanal at NydusSpawn[TempRan] set NydusPointActive[TempRan] = true

    But it could just be the way that it came up on here, but I managed to nut it out with the post that @s3rius: had made and your help as well, So I had them all spawning when I wanted and the units spawning from them when they spawned, so it all came together up until the worm dies. But I'll change that bit when I get home and post an update on here, it should fix it now that I look at it. Setting triggers you're not sure of when tired = not always following logically lol. Thank you again for the help :)

    Posted in: Triggers
  • 0

    posted a message on [Solved] Storing Points with a random ID

    @SouLCarveRR:

    I'm still having some trouble, this time its with the death of the worm. Using the methods of yourself and @s3rius: I have been able to get the worms to spawn when I want from where I want and for them each to have a separate stream of units spawning from them. And the ridiculous amount of variables I would have had to have has been cut to nearly none. But when the worm dies with @s3rius: method there is no way to account for which point died so as to shut off the boolean. And with your method @SouLCarveRR: for some reason I keep getting an error. I have managed to work out that the error is coming from the condition in if TempDistance < TempClosestPoint[i - 1]

    It is being flagged as an error in the GE and doesn't compile into the game.

    Any insight as to where I might have gone wrong with it will be appreciated. I already appreciate all the help everyone has given so far :)

    • EDIT
    • For some reason its not flagging it as a error anymore, but it is still giving the error while in game. Attached a screenshot of the trigger for easier reference.
    Posted in: Triggers
  • 0

    posted a message on [Solved] Storing Points with a random ID

    Ok I have had a play with it and in order to spawn 4 worms at once and get a continuous stream from each of the worms separately I need to create 4 triggers for spawns, as well as 4 triggers for when the worms die. But this is a whole lot better then the way I was doing it originally. I thank you again for the help :)

    Posted in: Triggers
  • 0

    posted a message on [Solved] Storing Points with a random ID

    @s3Rius

    I see thank you, I was thinking an array but wasn’t sure if it would work.

    Question though, I have 2 other triggers at the moment which calls upon the data of the point, one to initiate waves coming from the worm and one to stop the waves when the worm dies.

    I should be able to call upon the point generated from here with those right?

    I’m not at my sc2 computer at the moment but if I remember right it is

    (spawn units)
    action
    unit create unit at nyduspoint placed 1
    unit move

    (worm dies)
    event
    unit dies at nyduspoint placed 1
    condition
    triggering unit = nydus worm unit
    action
    stop all instances of nydus spawn units 1

    each of these are tripled (1 for each cast)
    I could put the create / move units one into the spawn zone to cut the triggers down without too much hassle / it loking too bad. Mainly worried about the death one. And stopping the units spawning once the worm dies.
    which is why im asking here, since I know im doing something wrong or at least in a roundabout way when theres a much more efficient way to do them.
    It’s been a few years since I played with anything like this. :( But I thank you very much for the help. :)

    *The text type wants to break on me and not show up right using wikicreole or cursewiki so had to post this in textile :(

    Posted in: Triggers
  • 0

    posted a message on [Solved] Storing Points with a random ID

    @s3rius: Go

    What I am trying to acclomplish is to have 20 preset points and at the start of the game have each of these points assigned to the variables of Nydusplaced (1-20). The reason for this is that I want to place up to 4 Nydus worms at a time in these points randomly, and by assigning them to integer variables and comparing them when they are assigned is the only way I could work out how to make sure I would not have any doubles at any time (run the trigger and have 2 worms spawn on the single point). This also helps since I could set waves to spawn from that worm when it was placed and kill the spawn when the worm dies without interrupting any others. To clarify a bit more, I have a unit moving from point A to point B, inbetween those points are 3 zones, when he reaches one of the zones he stops, does a cast animation and then a number of worms (depending on difficulty) spawn at one of the random points. And so on. I had it set to 9 worm points total and the three casts, and had them working out the points each time he hit the zones. But with modifying the number of worms per difficulty rating I needed to add more worms and to make sure that I wouldnt get doubles I pushed the number of spawn points to 20 (to allow up to 6 difficulty rating rather then the 4 I am working with now). I also have changed the randomisation of the points to be at map init rather then per cast, so as to cut down on lag ingame. So I have set up a nested if-then-else on map init getting those points, but am worried I am going about this the wrong way. I have thought about it since and think I might break the points down from a flat 20 randomisation to 3 seperate points of 6 (might make 1 extra point and make it an even 7 per trigger) but would like some advice if anyone has a better idea on how to do this.

    @nevjmac: Go

    Pretty much nail on the head mate.

    Sorry for not being more clear guys. :(

    Posted in: Triggers
  • 0

    posted a message on [Solved] Storing Points with a random ID
    What I'm trying to do is I have 20 points on the map that I am going to have nydus worms spawn from, these are controlled by variables
                   NydusPoints = No Point <Point[20]>
                   NydusPoint Placed 1 = 0 <Integer>
                   NydusPoint Placed 2 = 0 <Integer>
                   NydusPoint Placed 3 = 0 <Integer>
    
    and so on. These points are so I can use another function to call upon spawning the units at the right spawn point and keep spawning them there, as well as terminate them when the worm dies.
       Actions
           Variable - Set NydusPoint Placed 2 = (Random integer between 0 and 8)
           General - If (Conditions) then do (Actions) else do (Actions)
               If
                   NydusPoint Placed 2 == NydusPoint Placed 1
               Then
                   Trigger - Run Nydus Build 2  (Ignore Conditions, Don't Wait until it finishes)
               Else
    
    is basically the version I was using for placing 3 worms up at once with 3 seperate triggers for each, I was wondering if anyone would have an idea to generate these ids and call upon them later rather then doing a huge nested if then else on map initialization to generate the points id's, or if anyone has a better idea to spawn the worms and continously spawn units from them until the worm dies.
       Actions
           Variable - Set NydusPoint Placed 2 = (Random integer between 0 and 8)
           General - If (Conditions) then do (Actions) else do (Actions)
               If
                   NydusPoint Placed 2 == NydusPoint Placed 1
               Then
                   Trigger - Run Nydus Build 2  (Ignore Conditions, Don't Wait until it finishes)
               Else
    is the trigger I used to spawn the units. 
    
       Actions
           Variable - Set NydusPoint Placed 2 = (Random integer between 0 and 8)
           General - If (Conditions) then do (Actions) else do (Actions)
               If
                   NydusPoint Placed 2 == NydusPoint Placed 1
               Then
                   Trigger - Run Nydus Build 2  (Ignore Conditions, Don't Wait until it finishes)
               Else
    

    Is the trigger I use to determine when the worm dies. EDIT: Forgot to add, the reason for the amount of points is that Im implementing a difficulty system and have 4 scales of difficulty, so with 3 instances of randomly spawning the worms I want to spawn 1 per difficulty level, so difficulty 4 will have 4 worms at once each time for 3 times. So difficulty 1 spawn (1, 2, 3) worms, Difficulty 2 (2, 4, 6), etc. The idea behind the random zone is to affect replayability, so that it isn't "ok, boss time, worm spawns here, worm there."
    Posted in: Triggers
  • 0

    posted a message on [Solved] Units attacking the far edge of the actor instead of the unit.

    @scmapcritic: Go

    Yeah I considered that after I posted, make a unit up that has no model and simply put it in in the trigger instead of the helios.

    Problem that I have then is that without an actor I get the circle of shame (no model present), so as a work around now I have just made an actor and given it a model and shrunk the hell outta it so it is hidden below the ship. I had to attach a footprint to it as well so that the melle units would not run inside the ship and be hidden while still attacking it. Its the closest I can get to making it look like the ship itself is being attacked.

    Posted in: Miscellaneous Development
  • 0

    posted a message on [Solved] Units attacking the far edge of the actor instead of the unit.

    As I mentioned in the title, I am having a problem with units attacking the edge of the model instead of the unit itself.

    To clarify I am using the unit WreckedBattlecruiserHeliosFinal (Unnamed) from the campaign dependencies. What is happening is that all other units attack the very edge of the model, to be exact the very beginning of the crash trail. I would like for them to attack the ship if possible since one of the conditions on my map is that if the ship dies you lose the game, and having units attack the trail instead of the ship and damaging it doesn't seem quite realistic.

    Any ideas anyone has to change this will be greatly appreciated.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Computer player and nydus worms, How?
    Quote from Draun: Go

    Thanks! I've been looking that for so long.

    EDIT: I have some problems at following your tutorial.

    I chosed Set Variable, but this is all I got; Set NydusPoints[0] = Did I do something wrong?

    And I can't find these: (Unit attribute check(Structure)) == False (not sure whether i wrote this condition correctly) (Unit attribute check(Missile) == False

    If they are not: ((Unit type of (Triggering unit)) has Structure attribute) == false because: Unit Type Attribution Check - Unit: Unit Type Of Unit - Unit: Triggering Unit - Attribute Type: Structure Operator: == Value 2: False

    And then Add unit to unit group doesn't let choose (ZergArmy).

    So, How many Triggers and Global Variables do I have to have?

    Sorry, I'm a little bit stupid :)

    Thanks.

    I was looking at this as well and had the same problem, what I had to set the variable to was point. NydusPoints = No Point <Point[8]>

    Haven't played with the rest of the trigger yet, but will do so later on.

    Btw sorry for the threadromancy. Was hoping to help Draun if they hadn't worked it out yet.

    Posted in: Miscellaneous Development
  • 0

    posted a message on WreckedHeliosFinal Unit Facing [solved]

    Never mind, I made some creative use of units / doodads to create the illusion it got bumped the way it needed to for the crash sites final display

    Posted in: Miscellaneous Development
  • 0

    posted a message on WreckedHeliosFinal Unit Facing [solved]

    Bumpity

    If anyone has any ideas it would be greatly appreciated, once I have this worked out I'll just need to set a few data things and I'll be able to finish the map. It just looks wrong atm with the way the ship is crashing and the final crash zone.

    Posted in: Miscellaneous Development
  • 0

    posted a message on WreckedHeliosFinal Unit Facing [solved]

    So here's my problem. In my map I'm having the Helios crash at the beginning, but the problem I'm having is that the wrecked version which I would like to remain in game is facing from bottom left to top right with the crash line, I have tried everything I could find / think of but I cant get the unit to rotate. The only space for the crash is to have it come from bottom right to top left, effectively I need to flip the model. If anyone has any ideas that could help me with this you shall be rewarded with gratitude, and a E-cookie ^_^.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Camera seeing through a model [Solved]

    @war2150: Go

    Thank you very much for that it worked, I feel like a idiot now, got to love those problems that you spend a hour or so looking at and then when you see the fix you just facepalm.

    I played with the occlusion before and tried the different settings, but didn't modify the unit that was attacking the rock, so it showed that unit and hid the rock. =(

    Posted in: Miscellaneous Development
  • 0

    posted a message on Camera seeing through a model [Solved]

    @progammer: GoThank you so much, I'll give that a try and post back when I get it working.

    One question though, will this still be modifiable like this if I have this rock being spawned through a trigger, at the moment it is being placed in at the beginning of the game through unit - create unit and after a timer once it has died.

    The idea is that this rock is stopping lava flowing into the map so once it dies the lava flows in, then after some time the rock is reformed there and the lava receeds.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Camera seeing through a model [Solved]

    Hi all, not sure if this is the right forum to post in on this subject, but thought it was the safest since its misc.

    Anyway, the problem I am having relates to the camera and visibility through units. I am spawning a Large destructible rock in one corner of my map which the computer will be destroying on a timer. But whenever the camera pans over the area or comes close to the rock the rock phases visibility and you can see through the rock to the surface behind that I want to be hidden until the rock is destroyed. The rock is a custom one with destructible - 4x4 copied stats with the actor for rock (tower) for it. All the other rocks just weren't large enough for this purpose. I have tried modifying the occlusion to hide and show since it was on auto for the actor in the data editor. But that hasn't helped any. Any help anyone has would be greatly appreciated.

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