GeorgeZaharia's Recent Forum Activity

  • You do not have permission to view this post

  • what i meant by using pathfinding is that you have to code the events to use it properly, once you figure out the size and spacing required for block sizes so pathfinding is working properly you need to code how units move by choosing a target position

    and you can do that if im not mistaken by using the RTS example construct comes with, is very similar to the image you are showing, basically u select unit, then for that unit u can use a boolean, or variable and set it to a value =1 then if value =1 the unit will find a path to move towards the target position u give it.

    the answer i gave previously was actually not broad at all, is the expectation you had that made it broad.

    considering you are a 2014 construct user i was thinking you know how to code the events to achieve something like that, is rather simple, i just pointed towards the simplest solution and that is usage of the pathfinding behavior.

    i think i have a tank example that does this and here it is super tank battle example

    that was made with pathfinding and some tutorials from our good old C2 that explains active minimap interaction.

    sadly i don't think i still have the capx for it... but pathfinding is the solution

    Edited: is your lucky day i found the capx from C2 tank example update v3

    however i just checked the advanced wars movement system, and it looks like grid movement + pathfinding.

    and for that there are 2 Construct2 tutorials i can think might be useful for your case example 1 & pathfinding tutorial explained

  • Gigatron hey, i remember you sent me this a long time ago, wondering if you still have it available? the bubblefx i can't remember if this is the one that could map a 2d image and make it roll or not ... i think is a effect from you that i used to create a fake 3d 8pool test

    but i think i lost the files... once the pm services shutdown on scirra.com, if there is a chance you still have it can i have a link for download please? much appreciated.

    Edited:... nevermind was the glsphere effect

    thanks for doing this all the time :D

  • it means u need to export using c2runtime.js from advanced settings. however if u built on c3runtime and u you downgrade ur system to c2runtime some objects events might be lost(because they might not be available in c2runtime::like bbcode for text objects and other new stuff) so tread carefully make a backup of your file before you do that.

    but i see u fixed it.

  • I have a player sprite and a target sprite. The Target sprite is set to mouse.x/y.

    The player's angle is set towards Target. If I click mouse, it spawns a bullet from Player and shoots towards the Target. WHAT'S HAPPENING IS... If the Target is too close to the player and shoots, then the bullet goes in another direction. I want to stop this from happening.

    On mouse pressed

    A:> create bullet at player.x y

    A:> bullet set angle of motion to angle(self.x,self,y,target.x,target.y)

    make sure the bullet that is created doesn't have the setting "setangle" ticked.

    if you have this already done in your project, i can't see a reason why it would fly a wrong direction, unless there is some event condition/action that is interfering with it.

    try testing the above on a clean project and compare it with your projects code.

    hope it helps.

  • that looks like manual pathfinding per unit, you can do the same type of movement by using the pathfinding behavior, or making your own pathfinding events_behavior.

    but yea pathfinding is the answer as i can see and a few re-usable events with functions.

  • this might help your case tracking your users with ajax-php-mysql

    ajax-php-mysql should do the trick then is a matter of updating / making the order complete or in progress by altering the table entries

    the tutorial covers most of the aspects +- some

  • Haha, im just glad you learned something, sure you can use any code inside my examples however you want.

    > You need to use the values to adjust the sprite object position that will move around in a circle.

    >

    > here is my orbit example | test it live

    Thanks bro, that is really good and works so well.

    However if i try to add any drag and drop behaviour or touch, the moon just stops.?

    yea that is cause it needs a everytick condition to change the A and update the position.

    for position on moon that needs some more adjustments probably more than a couple :D

  • You need to use the values to adjust the sprite object position that will move around in a circle.

    here is my orbit example | test it live

  • lol ... i wish .... nah im really bad at math ... but some of the expressions we use in Construct i use them very often so i sort of understanding them in my own way.

    Anyway the above examples should help you understand the elliptical motion, whenever u want a circle movement u use cos() for X and sin() for Y.

  • Yes it could solve it if the platforms were static but the core concept of my game is to create platforms at the player position so the platforms could be anywhere. So reducing the power fixs the issue just for this case but it's possible that a platform will be a little lower.

    you lost me there, i can't understand what your trying to achieve without seeing it.

    but if u have a position at which u spawn the platforms u then calculate the distance from bottom margin of the 1st platform to the position of the 2nd block or 3rd block topmargin u spawning and set the distance to the players power jump. you will also have to adjust the gravity/fall speed and all those little values to match and react properly.

    since u using 32 pixels by 32 pixels blocks u can also set the power jump to whatever is in front of the player so if u have 2 blocks u can set jump strength to 32 * N number of blocks stacked on top of each other in front of player at a distance of 100 pixels or less lets say.

    edited: example updated pick objects that are closer than 64 pixels distance and alter player jump based on it... isn't perfect but somewhere around there.

    it might not be what ur looking for but atleast will give u an idea.

  • u have to also reduce the power of the jump to 450 sorry i edited the above reply to late. the issue is the jump takes in account the speed ur running at the faster u run the higher u jump like in real life...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
GeorgeZaharia's avatar

GeorgeZaharia

Member since 30 Jun, 2014

Twitter
GeorgeZaharia has 35 followers

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x9
    Popular Game One of your games has over 1,000 players
  • x21
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

21/44
How to earn trophies

Blogs

  • Construct For Dummies - Simple Tutorial Collection

    I scour the Construct forums for users tutorial requests, and create small quick and simple tutorials using Construct's defaults features so anyone can use and apply them.

  • My Dev Logs

    Thinking on games 24/7 is fun and waste of time and unproductive if we don't bring those game ideas to life. In this blog im bringing my game ideas to life and log their development process.