clarke2509's Forum Posts

  • https://www.dropbox.com/s/ay3n35hjgdxhw6y/ArenaSpawnExample.capx?dl=0

    In no way am i an expert in construct 2 or is this perfect since i just put it together in like 5 minutes but i hope this can help you in some way.

  • no so like im working on a space game but realised its too demanding to make loads of planets on one big map so instead i want it to randomly spawn different planets to come on to the screen when moving.. so like an infinite runner, how it randomly spawns platforms... except this is for all 360 degree direction.

  • Hi, how do i infinte scroll in any direction, like an infinite runner but 360 degrees.

    I have tried using like a trigger box, for example;

    object on collision with trigger box (just a blank sprite)

    • destroy object
    • create object (opposite side of layout to carry on the scroll)

    this works for the first time and then it doesnt work again, any idea? or better ways of doing it?

    Thank you

  • Ahh yes, now i feel stupid, Thank you.

    If anyone else is wondering, all you have to do is regenerate pathfinding obstacle map when you open/destroy object.

  • I am using pathfinding for a character to follow the player and it works fine until i get to an obstacle...

    so at a door i click to open the door (rotate sprite 90 degrees) and when i breach a wall (destroy wall).

    The problem is when i do this and try to walk through the character stops following.

    I make the character find path every 1 second so he keeps updating following the player, does anyone know how to fix this?

    Thank you.

  • Ye I thought it would as simple as that but it completely messed it up so I don't think it works like that unfortunately

  • Yes that is correct.

    This is an image which is similar to my hexagons except the 60,70 which i was referring too is the width and height of the object in pixels.

  • So my issue is im trying to make a hexagon grid snap in game.. so ive searched and found one which works on a flat orientated hexagon... the problem is mine is pointy orientated hexagon(the point of the hexagon is at the top). so i tried googling it and tried finding formulas but i dont understand them so please can someone tell me what my formula should be..

    so the size of my hexagons are 60,70

    and the code i have found for the FLAT orientation is;

    On drag drop

    • set x to round(4*(Touch.X - 320)/(3*self.Width))
    • set y to round((Touch.Y - 280) / self.Height - self.X / 2))
    • set position to (self.Width*self.X *3/4 +320 , self.Height*(self.Y+self.X/2) + 280)

    I dont understand this at all so can someone whos good a math please tell me what my formula would be for a pointy orientated 60,70 hexagon?

    Thank you.

  • ive realised pick by unique ID would be unefficient so i have attempted to use a more efficient system to do this by using a grid formula but thank you for you fast reply...

    Since ive now changed, my next dilema is finding a point orientated hexagon grid formula

  • Hi, i am working on a game which uses a grid so i have the same grass grid but copyed and pasted numerous times.. how do i pick which grass to go on by touch because at the moment wherever i click it only creates an object on the origional sprite.. not on the copied ones.

    is there a way of making it create an object on the specific grass object i clicked on?

    Thank you.

  • i followed the tutorial to scroll screen with touch but it scrolls way too fast so far my code shows;

    on any touch start

    • set dragging to 1
    • set dragMouseX to touch.AbsoluteX
    • set dragMouseY to touch.AbsoluteY

    on any touch end

    • set dragging to 0
    • set dragScrollX to scrollx
    • set dragScrollY to scrolly

    dragging = 1

    • scroll to ((dragScrollX + dragMouseX - touch.AbsoluteX), (dragScrollY + dragMouseY - touch.AbsoluteY))

    does anyone know how i can slow down the drag because at the moment it is way too sensitive and flies around the screen.

    Thank you

  • Thank you so much this helped a lot

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I was wondering if there's a way of tracking distance travelled using geolocation. it will be shown as a progress bar so it doesn't need to be accurate to a map it just needs to show distance travelled in metres/feet.

    thank you

  • I'm creating a level based game and its starting to become tiring making UI for each level, I know there is a global layout I can use but is there a simpler way of creating multiple level UI with the achievement

    stars on them ( example: angry birds UI, how it shows the stars then you can play from there on each level)

  • yo!!

    ok, so if you have a

    (physics on the car btw)

    Is In touch event-------------------apply force to position( depends on the size of your car) touch.x touch.y

    every...(i did 0.00009)seconds-------and i did rotate 5 degrees towards angle

    needs ALOT of tweaking... but this gives the illusion force is being applied to the car and it accelerates to the desired position with it's speed being affected by motion

    slap in some immovable physic barriers for the track and boom!, you could even have some AI cars that have check points to drive to. loads of examples of these so enjoy

    try it out, i'll keep working out some bugs so the angle is equal to the direction of force. thought id post my current findings though in case it helps

    okk so I've tweaked around with this and it sort of works, well it works on its first time and then any other destination is just unpredictable which I think it is dependant at what angle it is at, for example turning different ways, so I'm not sure how to fix this.