How do I

0 favourites
  • 10 posts
  • Hi. I need some help with my character selection.

    what happens is that i have a main charater in display on level 1 layout (destroyed on layout start). that character (and all of them) are moving with touch, so when i touch its position is where i touch and if a drag the finger, the main character follow my finger.

    the problem comes when i have several characters (1,2,3...) to choose. i made a global variable with so many values, each value is a character, but now, how do i spawn once the character i selected where i touch? because meanwhile the global variable is 2 for example, (because i selected that character), it's a non stop character selected spawning, every where i touch it creates a character and when finger moves it leaves a path full of the character i selected.

    how can i make it work like the main character?

    i thought of putting every single characetr on level one and then destoy them on layout start, but wouldnt it take ages to load that level? there are like 50 characters to choose..

    how can i fix this. help-

  • i do not understand very much

    but what i understand is

    you want to spawn single character from multiple and each one has a number

    and you have problem, when you want spawn single character only once, Character is spawning multiple time

    so if i am right

    Then it seems like you are doing a mistake like

    when global variable =2 then spawn character 2

    this is the problem because character will be spawn every time until you change global variable

    so to fix this you have to do is

    When global variable =2

    Trigger once while true | Spawn Character 2

    I hope it helped

  • i do not understand very much

    but what i understand is

    you want to spawn single character from multiple and each one has a number

    and you have problem, when you want spawn single character only once, Character is spawning multiple time

    so if i am right

    Then it seems like you are doing a mistake like

    when global variable =2 then spawn character 2

    this is the problem because character will be spawn every time until you change global variable

    so to fix this you have to do is

    > When global variable =2

    Trigger once while true | Spawn Character 2

    I hope it helped

    do i attach trigger once while true with the global variable in the same box (under ir, but in the same Y point) or do i make it a subevent?

    what about the touch movement? shoul i put a new event with its proper movement or all goes inside global variable box?

  • i do not understand very much

    but what i understand is

    you want to spawn single character from multiple and each one has a number

    and you have problem, when you want spawn single character only once, Character is spawning multiple time

    so if i am right

    Then it seems like you are doing a mistake like

    when global variable =2 then spawn character 2

    this is the problem because character will be spawn every time until you change global variable

    so to fix this you have to do is

    > When global variable =2

    Trigger once while true | Spawn Character 2

    I hope it helped

    luckyrawatlucky also i want once i remove my finger, to leave the character on my last touch point until i touch again, so when i touch it destroys last character.

  • please explain clearly

    do you want to keep character at your last touch point or you want to delete it

  • please explain clearly

    do you want to keep character at your last touch point or you want to delete it

    i want to keep it on my last touch point until i touch again, so when i touch again the one that was on my last touch position gets deleted and a new one appears on my new touch point.

  • Can you give us a capx ? it would help !

  • Can you give us a capx ? it would help !

    luckyrawatlucky

    Divivor

    AkiraBoy

    mediafire.com/file/uxv96s6sfff1jr4/example.capx

    example here, enjoy and help

    mediafire.com/file/uxv96 s6sfff1jr4/example.capx

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You just need to add :

    On "Touch" :

    Player.Destroy

    System create object(Player) on layer 0 at (touch.X,touch.Y)

    And keep :

    On "Is in touch": Player set player position

    I think that is what you want, but i'm not sure, tell me

  • [
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)