How do I spawn several actors at set times on a set angle?

Tmyster88Tmyster88 AustraliaMember Posts: 19

Hi Newbie here… 1) I want to create continuous spawns randomly or at set times at a specific angle (Not Down) more like 45deg.
2) I then want to be able to grab those spawning actors by touching them 3) and then dragging them to a set point.

Your help would be very much appreciated as I'm about to loose the last strand of hair on my head as I continue to pull my hair out :)
Tmyster88

Best Answers

  • SocksSocks London, UK.Posts: 12,822
    edited August 2014 Accepted Answer

    @Tmyster88 said:
    1) I want to create continuous spawns randomly or at set times at a specific angle (Not Down) more like 45deg.

    I don't know what 'continuous spawns randomly' means.

    If you want to spawn something at a specific angle then simply specify that angle in the spawner, for example if you want something to spawn at 45° then put 45° in to the 'Direction' box.

    2) I then want to be able to grab those spawning actors by touching them 3) and then dragging them to a set point.

    If you want to be able to grab (and drag) the spawned actors, place two constrain behaviours in the spawned actor.

    Constrain the actor's X position to the mouse's X position.

    Constrain the actor's Y position to the mouse's Y position.

    The 'wrap' these two constrain behaviours in a rule that says this will only happen when you touch the actor . . . so you should end up with this:

    When actor receives event / touch / is / pressed:

    - Constrain the actors X position to the mouse's X position.

    - Constrain the actors Y position to the mouse's Y position.

  • bufteabuftea Posts: 43
    Accepted Answer

    hello! Newbie here also.
    1) set a timer, and inside the timer drag a Spawn actor attribute. The attribute has angle management. This timer should be inside a source actor, different from the spawned ones.
    2) and 3) create a Rule for the spawned actor and for the condition drag Touch and set it to ""inside"" . drag Touch again and set it to ""pressed"". for the behavior drag Constrain Attribute twice. In the first one constrain the x location of the spawned actor to the x location of Touch and in the second one do the same for y location.

    I don't know if this works, I don't have a ""touch"" environment to test yet, but it should give you a test file to start with

Answers

  • Tmyster88Tmyster88 AustraliaMember Posts: 19

    Thanks Socks and buftea. 1) What I mean by continious spawning actors randomly is; I want the actor to shoot out at a specific angle over the course of the game at random time intervills to the same location i.e.; as the game progresses the actors come out faster but at random times to the same angle and location until the game ends. Thanks for the help, I will give it a go.

Sign In or Register to comment.