Need Help with An Event

0 favourites
From the Asset Store
Very simple code without excess options (15 events for server and 11 events for client)
  • Hello sweet people of community

    Here is a simple event i want to make work

    -If [ ObjectObstacle.Y > X ]

    --Trigger Once While True

    ---Create Another Object

    Basically my game is like doodle jump (endless top runner where the player jumps from one platform to other to reach as high as possible), the layout creates all platforms at start and each platform consist of two parts (platform itself and a particle object) but i want the particles Object to create only when player reaches near the platform , by doing this i want to limit the object count of my layout [I hope i made my motive clear]

    Now i want this simple equation to work :

    -If [ ObjectObstacle.Y > X ]

    --Trigger Once While True

    ---Create Another Object

    But it is working only randomly for some platforms, only random platforms are creating the particles,

    am i using this event wrong?

    what should i do to make this work?

    Regards

    Shubham

  • I am not sure about your events, but you can take my capx for example :

    drive.google.com/open

  • Maverick1912 Your provided example is not creating platforms as it supposed to but also This is a simple example of doodle jump,

    Now lets suppose i am creating all platforms for game at start of the layout and now i want to create another instance on top of those platforms (say a monster) as soon as the player reaches to the platforms

    that means if platform height > specified height (say layer.top.Y) then create instance(monster) on top of that platform!

    This is what i am trying to do but is not working, i want to know how to make it work

    Can someone tell me what is wrong with this simple trick?

  • Ah with that, I can check new update of my capx :

    drive.google.com/open

    I have added the monster on top of random platform.

  • Sorry bud but its not working again, no platforms are creating besides the one you have put in the layout itself

    also i think you didn't understood the problem i am raising i this topic, i know that i can simply create a monster each time a platform is created but if you read my first post, i want a simple mechanism to work i.e. i create all platforms at start of layout (say i have put them already manually in the layout, say i created a level) , now assume i want to create 3 more objects related to each platform but if i create them rightaway (@ platform> On created) it will give us a lot of object count (number of platforms X 3), which will lead to performance lag and even more collision checks. Thus i want to create the objects related to the platform only when platform is detected near the player.

    Hence that event that i posted earlier!

  • Did you try Container ?

    They will create and destroy together.

  • Dont wanna be rude but Please bother reading my post first before you post a suggestion!

  • Bump!

    No working solution yet!

    I need a construct guru to help me on this!

  • 78 views so far but not a solution i will wait because i need this to work desperately, Help!!!

  • Hi !

    I'd be glad to help, but wouldn't it be simpler with a capx of yours? If you do not want to publish it, I'll try something on my own.

  • 78 views so far but not a solution i will wait because i need this to work desperately, Help!!!

    Something Like this?

    https://www.sizzle-games.com/objectcreatenear.capx

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • radyan

    Its a really heavy project and i have to remove a lot of things to provide a capx but i will try to provide the events i want to work!

    sizcoz

    Yes, this is kinda what i want but their is a huge problem with it which is the unlimited number of objects that it will keep on creating while player is near the platform!

    M Not able to post the screenshot here that i took, in it the object count reached 7000 in a minute which is opposite to what the event is for i.e. to keep number of objects in limit and thus reduce the collision checks!

  • Yes, this is kinda what i want but their is a huge problem with it which is the unlimited number of objects that it will keep on creating while player is near the platform!

    You can fix this problem by adding a small condition like this.

    EDIT : Hum... Can't figure out how to display my screenshot. Here is the link then : image.noelshack.com/fichiers/2018/27/6/1530965768-modif-sizcoz-capx.png

  • radyan

    Thanks i am also trying the same by adding a variable condition to each platform, will tell you if it works!

  • radyan

    Its a really heavy project and i have to remove a lot of things to provide a capx but i will try to provide the events i want to work!

    sizcoz

    Yes, this is kinda what i want but their is a huge problem with it which is the unlimited number of objects that it will keep on creating while player is near the platform!

    M Not able to post the screenshot here that i took, in it the object count reached 7000 in a minute which is opposite to what the event is for i.e. to keep number of objects in limit and thus reduce the collision checks!

    Have re-uploaded capx, so it only creates 1 object, at a time.

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