How to get actor to start in scene

Hi, when my actor hits blockA it changes the scene.
how do i spawn or start the actor at a particular part of scene, as soon s he hits the block,. starts on the next screen?
ive tried using attributes ect but id rather have a more simple way if possible, one that doesnt involve hiding or making visiable or changing image.

thanks alot

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    @sonicm3 said:
    how do i spawn or start the actor at a particular part of scene, as soon s he hits the block,. starts on the next screen?

    Do you mean how do you position (or spawn) an actor at a specific location ?

    If that's what you mean then you can either simply place the actor at the position you want when you are laying out the scene, or you can give the actor a couple of change attribute behaviours that specify it's X and Y position.

  • sonicm3sonicm3 Member Posts: 141
    edited April 2016

    only problem is, i would him to go back n forth through the same door, changing from scene 1 to 2 alot., so i cant really place the actor in scene, i wish i could its alot easier, unless there is a work around for it?

  • sonicm3sonicm3 Member Posts: 141

    so basic, i have SCENE1 and SCENE2

    when my actor goes through the trigger to CHANGSCENE i would need to actor to spawn at specifc x and y on the next scene.

    Ive tried to do this, but my actor spawns floating around like a doll?

    can someone be kind enough to type me the code to put in the actors so i can check it with mine and se where im going wrong?

    cheers guys

  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2016

    @sonicm3 said:
    i would him to go back n forth through the same door, changing from scene 1 to 2 alot

    If the scene change is triggered by going through this door, could you not place the actor at the location of the door in each scene ?

    For example if we get to scene 2 by passing through a door, then when we get to scene 2 we should expect to be at the location of the door - so we could layout scene 2 so that the actor always starts at this door ?

  • sonicm3sonicm3 Member Posts: 141

    i could, but, u see there are two ways onto the scene. High door and low door. If my actor goes through the lower door, he would need to appear at the bottom of the scene, if he exited the scene at the high door, he would need to be at a higher ground.

  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2016

    @sonicm3 said:
    i could, but, u see there are two ways onto the scene. High door and low door. If my actor goes through the lower door, he would need to appear at the bottom of the scene, if he exited the scene at the high door, he would need to be at a higher ground.

    Make a game attribute/s that records the position of the actor when exiting a scene, then use this attribute/s to determine the position of the actor in the following scene.

    Example . . . .

    Actor in scene 1

    When actor collides with door
    --Change game.locationX to self position X
    --Change game.locationY to self position Y
    --Change scene

    Actor in scene 2

    Change self position X to game.locationX
    Change self position Y to game.locationY

  • sonicm3sonicm3 Member Posts: 141
    edited April 2016

    Hi thanks, i tried that, works, but it appears he is in the bottom left corner of the map.

  • sonicm3sonicm3 Member Posts: 141

    i think i did it with, game.locationX+40 and game.locationY+5 , but my actor, when he collides with anything, its like hes a rag doll, getting thrown around all over like in space, with no gravity, i checked all the commands in the actor and all are fine from previous level untouched., yet he still , one touch and hes away flying all over?

  • IceboxIcebox Member Posts: 1,485

    @sonicm3 said:
    i think i did it with, game.locationX+40 and game.locationY+5 , but my actor, when he collides with anything, its like hes a rag doll, getting thrown around all over like in space, with no gravity, i checked all the commands in the actor and all are fine from previous level untouched., yet he still , one touch and hes away flying all over?

    if your actor is moveable , make sure fixed rotation is checked and turn the physics bounciness to 0

  • sonicm3sonicm3 Member Posts: 141
    edited April 2016

    thanks ice, solved that issue as you said with the physics issue. However actually, the above method i tried by socks didnt work. it did spawn the actor on the next scene, but only where i placed him.
    I need it to work so that, if he exits scene1 at the top, he appears on next scene at the top, and if he exits the door at the bottom, he appears on next scene at the bottom.

    any ideas? socks, ice, or others?

  • IceboxIcebox Member Posts: 1,485

    @Socks said:
    Example . . . .

    Actor in scene 1

    When actor collides with door
    --Change game.locationX to self position X
    --Change game.locationY to self position Y
    --Change scene

    Actor in scene 2

    Change self position X to game.locationX
    Change self position Y to game.locationY

    @sonicm3 I think this should work fine , maybe you had the change scene first , code order issue , i'm not sure , but if you ask me ill give you the same solution.

    You can see this video made by @jamie_c " RPG- Connecting the rooms of a dungeon" , thats how i learned.

  • sonicm3sonicm3 Member Posts: 141

    will this work for windows ? he said it wont, but not sure how old this is? im using the new windows version, do you think they updated then info for windows?

  • sonicm3sonicm3 Member Posts: 141

    seems as he is just addressing the issue of entering a few rooms, i can do that fine, but my issue is entering the same room twice from different points of the scene 1.

  • IceboxIcebox Member Posts: 1,485
    edited April 2016

    @sonicm3 said:
    seems as he is just addressing the issue of entering a few rooms, i can do that fine, but my issue is entering the same room twice from different points of the scene 1.

    Did you see the whole video ?? minute 21 shows what you want to do :)

  • sonicm3sonicm3 Member Posts: 141

    justt about to build the project now to learn it all with tables, thanks mate

Sign In or Register to comment.