DozeMaster's Forum Posts

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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...

  • change is W down to W was pressed. that fixes it on my end. and reduce the power jump to 450 instead of 460.

  • try this tutorial Ellpitical Orbit its a old c2 tutorial but for sure will work on your end.

    basically is using Cos() and sin()

    and this is the 2nd circular/eliptical motion one but might be a bit complicated. cause it has to many variables.

    but to rotate a object around a point u basically calculate it like this

    position x centerX + cos( A*B ) * circumferenceX

    position y centerY + sin( A*B ) * circumferenceY

    centerX and centerY are like for example the position of a planet you want a moon to spin around it.

    curcumferenceX and circumferenceY will make the circular motion change around a 3d plane of sorts(it moves in a 2d plane but altering live the values of A*B and circumferenceX or Y it will make it look like is a 3d sphere - very similar to the 2nd tutorial i linked). if u make circumeferenceY less than circumferenceX ul see it go on a smaller Y motion while keeping same X width motion.

    cos(A*B) and sin(A*B) calculates moons position relative to the position of the planet in degrees * circumferenceX or Y (not sure if i explained it the right way but that's how i understand it).

  • ok, try replicate your exact jumping system you have issues with it now, no need for other events(that is if other events are not movement based, if they are movement based please include those also in the same order/values).

    and will take a look at it.

  • every 1 seconds add to variableScore 1

    txtScore set text to "Score: " & variableScore