• 0

    posted a message on Camera Ajustments

    I don't have the time right now to go into detail beyond this...

    Quote from ElBushido: Go

    @zandose: Go Could not find " Heght of UnittoFollow" and again i need this to go off for all 8 players without 8 separate triggers..

    "Heght of (some unit)" is a function

    "UnittoFollow" is simple a variable containing the unit.

    As for one script for all players:

    Untitled Trigger 001
        Events
            Timer - Elapsed time is 1.0 Game Time seconds
        Local Variables
            Variable.Units = No Unit <Unit[8]>
        Conditions
        Actions
            ------- You need to assign the players unit to the variable
            Variable - Set Variable.Units[1] = Marine [104.00, 148.21]
            ------- 
            Player Group - Pick each player in (Active Players) and do (Actions)
                Actions
                    Camera - Apply camera object Height Offset ((Height of Variable.Units[(Picked player)]) + 1.0) for player (Picked player) over 0.0 seconds with Existing Velocity% initial velocity and 10.0% deceleration
    
    Posted in: Data
  • 0

    posted a message on Camera Ajustments

    Your looking for something like this.

            Camera - Apply camera object Height Offset ((Height of UnitToFollow) + 1.0) for player Player over 0.0 seconds with Existing Velocity% initial velocity and 10% deceleration
    
    Posted in: Data
  • 0

    posted a message on Third Person Camera Rotation

    Use the trigger "apply" instead of "set"

    UpdateCameraYaw
        Events
            Timer - Every 0.0 seconds of Game Time
        Local Variables
        Conditions
        Actions
            Player Group - Pick each player in (Active Players) and do (Actions)
                Actions
                    Camera - Apply camera object Rotation (Facing of Global.Unit.Hero[(Picked player)]) for player (Picked player) over 0.01 seconds with Existing Velocity% initial velocity and 10.0% deceleration
    
    Posted in: Triggers
  • 0

    posted a message on [New Small Question] Code Elegance Question

    @FoxyMayhem: Go

    I guess the wording can be a bit confusing. The variable will simply hold which player the loop is currently running for, it's just letting you pick which variable you want to use instead of doing it itself. Make a local integer variable and use that for the "player variable".

    Also its just like the trigger under it called "Pick each player in (player group) and do actions", except in this case the trigger itself will provide the variable. So instead of using a local variable for the player you'd use the function "picked player".

    Untitled Trigger 001
        Events
            Timer - Elapsed time is 1.0 Game Time seconds
        Local Variables
            ThePlayerVariable = 0 <Integer>
        Conditions
        Actions
            Player Group - For each player ThePlayerVariable in (Active Players) do (Actions)
                Actions
                    Debug - Display (Text(ThePlayerVariable)) as debug output using Type 01, and Do display it in the game window
            Player Group - Pick each player in (Active Players) and do (Actions)
                Actions
                    Debug - Display (Text((Picked player))) as debug output using Type 01, and Do display it in the game window
    
    Posted in: Triggers
  • 0

    posted a message on [SOLVED] Loops acting weird.

    @butterflo: Go That message at the bottom is so small that I didn't even see it until checking back a day later.

    I have no idea why it does what it does. if you really want to know debug each line of code.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on [New Small Question] Code Elegance Question

    My bad. I was simply asking if you still wanted to convert your while-loop to a for-loop and where you were at with the code.

    Posted in: Triggers
  • 0

    posted a message on [New Small Question] Code Elegance Question

    @FuzzYD: Go

    Yes and no. While loops, if not properly made or the unexpected happens, can run on forever crashing the game. So I don't use them often. If it works for you it works. I believe FoxyMayhem said there was a chance of their being a fourth column, so it's uncertain if he'd need the for-lopp to run 3 or 4 times. and therefore a while-loop wouldn't probably be a good option as long as safety's were added.

    As for the for-loop not working, you probably missed something as for-loops can do anything while-loops can, you just need to change the code a bit. You just need to debug it to hell.

    So where is this project currently at?

    Posted in: Triggers
  • 0

    posted a message on [SOLVED] Loops acting weird.

    @Kueken531: Go :) That's basically what I did. Recreated the framework trigger, debugged the hell out of it, and found dead units getting referenced again.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on [SOLVED] Loops acting weird.

    I've done some testing and I've found perhaps one problem. In your repeat/switch-case part of the trigger, killing a unit does not remove it from the unitgroup, in which case the trigger may be reusing an already dead unit (closet unit to point). To fix it, create another unitgroup variable, copy the original unitgroup to the new variable, and use this new variable instead for the repeat/switch part, and after you kill the unit add a trigger to remove the unit from the new variable.

    See if this solves the problem, otherwise I'll have to keep looking.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on [SOLVED] Loops acting weird.

    @butterflo: Go

    You said raw version, does that mean you made it in GUI? If so post that too. I'm not too good at reading raw/galaxy.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on [New Small Question] Code Elegance Question

    Have you thought about player groups for this task?

    Untitled Trigger 001
        Events
            ------- Deisgned for only two teams.
            Timer - Elapsed time is 0.1 Game Time seconds
        Local Variables
            Group.Team1 = (Empty player group) <Player Group>
            Group.Team2 = (Empty player group) <Player Group>
            WhichTeamToAssignTo = False <Boolean>
        Conditions
        Actions
            Player Group - Pick each player in (Active Players) and do (Actions)
                Actions
                    General - If (Conditions) then do (Actions) else do (Actions)
                        If
                            WhichTeamToAssignTo == True
                        Then
                            Player Group - Add player (Picked player) to Group.Team1
                            Variable - Set WhichTeamToAssignTo = False
                        Else
                            Player Group - Add player (Picked player) to Group.Team2
                            Variable - Set WhichTeamToAssignTo = True
            Player - Make all players in Group.Team1 treat each other as Ally With Shared Vision
            Player - Make all players in Group.Team2 treat each other as Ally With Shared Vision
    
    Posted in: Triggers
  • 0

    posted a message on [New Small Question] Code Elegance Question

    Edit: I forgot to read all the posts on page one lol. Deletes everything.

    Posted in: Triggers
  • 0

    posted a message on [SOLVED] Loops acting weird.

    Have you tried running debug message tests to see what the trigger is "really" doing? For each possible action you have a different debug message and also another debug message for displaying variable before and after to see what happened.

    I've made triggers before which I thought did one thing but did another.

    Posted in: Galaxy Editor Bugs and Feedback
  • 0

    posted a message on useing the numlock part of the keyboard

    While looking up which key to use for the event, type num into the search field. "Num Pad Decimal" is the same as delete. You'll perhaps need to create a global boolean variable to keep track of whenever the "Num Lock" key is pressed if you want Del and the Decimal keys (which are the same keys) to act differently when numlock is on/off.

    Posted in: Triggers
  • 0

    posted a message on Good WASD movement with third person camera?

    The secret is using the trigger "point with polar offset" and using "unit-facing (angle) + adding certain angles for different directions". Like 0 is forward, 180 is backwards, 90 for right, and 270 for left. Then you can simply change the yaw of the camera to the units facing.

    If you want the unit to move based on the camera use "camera yaw" instead of "unit-facing (angle)".

    Diablo like control system: http://www.sc2mapster.com/forums/resources/tutorials/25464-new-diablo-controls-tutorial/

    WSAD system: http://www.sc2mapster.com/forums/resources/tutorials/6981-trigger-reduced-lag-wasd-movement/

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