Skyhunter's Forum Posts

  • how do i set value to _???

  • I have used create object by name, and in the same event or subevent, i want to give that object some values.

    Is it possible and how would i do it?

  • Well, your system is ok, but this takes only one event for rotating back with the rotateangle.

    http://www.mediafire.com/?l7lgltjdgrm733b

  • ah sry, i was actually wanting to get rts speed from a family, i forgot to mention that.

    But thanks nevertheles. this helped Unit[RTS].Speed

    Can i pull anything with behavior with [behname] for families?

  • Nevermind, i found a rotateangle in the system expression, and used that. Its basicly what i wanted.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • yes i did look at it, but thats not the problem, if u set carmovement to your tank, and you have no control over the cannon, its shooting by itself at enemies, when there are no enemies around it should rotate back into neutral position(tank angle)

  • 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

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