• 0

    posted a message on Camera Object - Rotation
    Quote from Xackery: Go

    I didn't really look at all your code, but I do know that there's a bug with Galaxy right now I stumbled upon.

    Instead of Set Camera Object Property (Rotation), try Apply Camera Object Property (rotation).

    Setting the camera object rotation seems to have a bug in what degree rotation values it accepts.

    Apply Camera Object Property (rotation) seems to have the same problem or maybe I don't use the good function. Are your sure that it may work with this function?

    EDIT: This is my current code, it's really close to work except an horrible shake of the camera who continuously switch between 2 positions when rotating (I precise that this 2 positions moves, that's why I think that this problem comes from the error told by Bauf)

    CameraPosition
        Events
            Chronometre - every 0.01 seconds in Game time
        Local variables
        Conditions
        Actions
            Variable - Fix PlayerUnitRotation = (Yaw of camera from player Player_1)
            Camera - Define Player_1_Camera Target to (Position of PlayerUnit)
            Camera - Define Player_1_Camera Distance as CameraDistance
            Camera - Define Player_1_Camera Height offset as CameraHeight
            Camera - Apply Player_1_Camera for player Player_1 during 0.0 seconds with an initial velocity of Existing velocity%, a deceleration of 10%, and Include the target
            Camera - Apply a camera object Rotation PlayerUnitRotation for player Player_1 during 0.0 seconds with a velocity of Existing velocity% and a deceleration of 10%
    
    Posted in: Miscellaneous Development
  • 0

    posted a message on Camera Object - Rotation

    For the moment the great problem in front of me is the one you exposed as problem "2". And it seems that the more you rotate, the more this "error" increase and that make the camera shake more and more violently... that's really annoying because I think it's caused by a bug and that's the only problem left in front of me :(

    Posted in: Miscellaneous Development
  • 0

    posted a message on Camera Object - Rotation

    Thanks, but I can't find Apply Camera Object Property (rotation) for an object, it only want to make me apply the rotation directly on a player camera. (And as my editor is in french the names aren't the sames -_-)

    Posted in: Miscellaneous Development
  • 0

    posted a message on Camera Object - Rotation

    No because there is a time between frame where the Yaw the the player camera is modified:

    This is how it works:

    Frame 0:
    - We take the value of the yaw of the camera of player 1
    - We modify the camera object
    - We set the camera of player 1 to camera object
    
    *Between frame 0 and 1*
    - Camera of player 1 is updated with a new Yaw because the mouse moves
    
    Frame 1:
    - We take the value of the yaw of the camera of player 1
    - We modify the camera object
    - We set the camera of player 1 to camera object
    
    etc.
    

    I know that this works because the camera moves but his first this move is really rought and then the angle yuo watch can go further than 90° or less than 0°, I don't know why.

    The problem is that if I say for example that camera object rotation property = 270° and then I use a function to print the yaw of this camera it told me that the Yaw = 0!

    Posted in: Miscellaneous Development
  • 0

    posted a message on Camera Object - Rotation

    Oh yes sorry, I forgot to say that I also locked the parameters to rotate the camera using the mouse in a init file that run at the start of the map. The idea is to take the rotation of the camera of player 1 and assign it to my custom camera and then assign my custom camera to be the camera of player 1, like that I have a better control of the player 1 camera.

    I've done that like this because it seems to be the only way to track the mouse moves and transfert them to a camera object.

    Posted in: Miscellaneous Development
  • 0

    posted a message on Camera Object - Rotation

    Hello, I try to do a 3rd person camera using a camera object (I've already done it without it but I'm not satified by his behavior). But the problem is that when I use the action "Define properties of camera object" to modify the rotation, the values of this rotation gone completely mad! The problem is that I'm french and so my editor language is also french so I translate all the names for you, I hope I didn't do any mistake and that you will understand the parameters I modified.

    So this is the code translate in english:

    CameraPosition
        Events
            Chronometre - Toutes les 0.1 secondes en Temps de jeu
        Local variables
        Conditions
        Actions
            Variable - Fix PlayerUnitRotation = (Yaw of player camera Player_1)
            Camera - Define Player_1_Camera target at (Position of Player_Unit)
            Camera - Define Player_1_Camera Rotation as PlayerUnitRotation
            Camera - Apply Player_1_Camera for player Player_1 for 0.0 seconds with an initial velocity of Existing velocity%, a deceleration of 10%, and include the target
    

    I really don't understant how does the "Rotation" property of a camera object works with the code! (If "Rotation" is not the good word in english, the paramater I'm talking about is the one just before the last one when you use the action "Define properties of camera object")

    Posted in: Miscellaneous Development
  • 0

    posted a message on Array as parameter of a function

    thanks for the answer, I will try to find another way to do my stuff...

    Posted in: Galaxy Scripting
  • 0

    posted a message on Array as parameter of a function

    Is it possible to set an array as a parameter of a function? When I add a parameter, the "Matrix" property is disabled and can't be enabled. Is there any other solution?

    Thanks!

    Posted in: Galaxy Scripting
  • 0

    posted a message on [Problem]Instantiate trigger script (avoid copy/paste)

    Another question, how can we set an array as parameter of a function? Because I created a function that need an array as parameter but it doesn't seems to be possible (the option cannot be use))

    Posted in: Triggers
  • 0

    posted a message on [Problem]Instantiate trigger script (avoid copy/paste)

    Ok, Thanks for the answers. I will probably use functions and arrays to try to find a way to make this simpler, but as I understand I will have to copy paste all my scripts for each entity and there is no solution to change this.

    Thanks for the help, I will probably come back for other question and talk about my map (or try to help with my little knowledge of the editor) :D

    Posted in: Triggers
  • 0

    posted a message on [Problem]Instantiate trigger script (avoid copy/paste)

    Hello, I'm a nooby and I'm curently working with 3 other person (nooby too) on a Starcraft II mod. I now understand well the basic mecanics of the Galaxy editor but I got a problem. Is it possible to instantiate a script like in every object based programming language?

    The example is that I create a simple Trigger that manage a unit behavior (attack when <PlayerUnit> enter the zone), but this trigger works only for this unit and if I want another unit acting like that I must copy/paste this trigger script and attach it to the new unit. It's quite a mess, moreover, in fact I got more than one trigger so I must copy/paste a whole folder.

    I though it's maybe possible to make something by creating my own library (For the moment I dont really know how to use them).

    Thanks for the awnsers and sorry for my english, I'm french

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