Skyhunter's Recent Forum Activity

  • How would i get current speed of the object using rts behavior. Basicly i just want to slow down the object.

    Like this:

    set rtsspeed to rtsspeed-10

  • What you need to do is reference the current value.

    So always - set 'sprite.angle' to 'sprite.angle' +20 * timedelta

    I don't know how to use this actually within one event, because it is not the same object, it needs to change its angle actually rotate based on other object.

    angle set angle lerp(.angle, newangle, 1-0.5^timedelta)

    Course you'll get the barrel roll when you go from 360 to 0....

    And all i get is barrel roll all the time

  • yeah but set angle doesnt rotate, it just sets the angle, i mean you could rotate it by doing +1 angle every some but rotate towards is much simple...

  • I noticed there is rotate towards object and rotate towards position, but no rotate towards angle or any custom value actually. Which would be quite great indeed.

    In case there is a moving object like a tank carrying a turret object on itself, by rotating the object the turret could be easily rotated aswell. Or in case you just want a lot of objects to rotate towards a specified angle, and not all of them towards a single point.

    Like a platoon order : "Bitches turn left, hua march!"

  • Thanks, this container thing is actually pretty good for some stuff.

  • I am making a small ship game after i decided to postpone the other project, and anyway i want to do a fighter enemy ai, meaning first closing in on target and then when in range shoot and get away from target, some kind of a hit and run.

    The first part is simple im usint rts behavior: move to object player, but how do i make him move away from that same object after he makes the shot.

    Nevermind, i solved it, if anyone is interested i did this:

    move to: player.x+((random(3)-1)*500) , player.y+((random(3)-1)*500)

    It works suprisingly good.

  • What does container do? I thought it was some easy way to attach an object to another, but it replicates the same object a lot of times and does nothing with the object that i added, can someone explain.

  • It doesnt work, i think it only works if there is a for each element loop in conditions.

    Ah sry it does actually work, but not quite good, i have a condition with something.x+1 something.y and it thinks it currentx without that +1

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I noticed there is an expression for current x or y position of the array, but there is no set current x or y.

    If i have a condition comparing the value of the array, and right after that in the actions the current x or y position, does it work?

  • thanks for the replies, although i am going to try and make a custom pathfinding, but since im not that good of a programer, it may take a while, anyway does anybody knows how do i spread value in construct?

  • I have several question about rts pathfinding.

    Anyway im currently making trucks that go around building stuff by themselves, but the point is if i set to avoid themselves they pretty much get stuck in each other, if they are solid obstacles they pound into each other and it looks ridicoulus. Also when i change the pathfinding cell size, with smaller size they are prone to get stuck more often, anyway whatever i have tried ends up pretty not good. With lots of units it also causes sometimes to crash. If the truck are not obstacles to themselves then its okay, but i would rather have them not going over each other, also my tile map and most unit sizes is 32x32 and i cannot adjust the cell size of pathfining to 32x32... which is annyoning, cause it would probably be better. I have tried a lot of combinations of code and settings, but nothing good so far.

    So if anyone knows what would be the best type of simple pathfinding code and setting for a normal go around stuff without being silly looking, to use please respond.

  • http://www.mediafire.com/?tymgtitmy4z

    heres the cap file.

    And an update, the cap isnt. But i managed to compare properly, but i want to event execute once when selection changes, but it doesnt work. Cause selecetion changed condition dont work.

Skyhunter's avatar

Skyhunter

Member since 14 Sep, 2008

None one is following Skyhunter yet!

Trophy Case

  • 16-Year Club

Progress

16/44
How to earn trophies