Aher0's Recent Forum Activity

  • now i'm on a loop where he scored in my goal, then his goal...

    I've tried using a sprite, with image point 0 to be set to the goal, then stretched to the balls position

    then added a new sprite "target" at image point 1 (just past the balls location) but he won't go there.

    I'll keep on with the trig, but my fundamental knowledge on maths in that area is a bit fuzzy.

  • honestly you are ahero, i gave up using sohcahtoa as i couldn't figure out how to use tan^-1 to get the angle from the sum (opposite/adjacent)

    i've seen you write alot of posts, and your answers always seem to involve trig, if your the reincarnation of Pythagoras i thank you

    not sure how to post pictures... so i guess i should troll the how to section before asking, If you get a capx up i'd apprieciate it. again, i'll troll how 2 so i can post a cap x, i'd love to share my fan made beta pokemon game

    after this attempt, and adding some variables to decide what to do when arrived, I +90 instead of 180, it moved into position then striking the ball and scored!!. So happy days... then failed when the sprite was moved :/ its ok, good start

    now back to my priority system i was failing so hard on

    this really makes me appreciate fifa games, and i NEVER thought i'd say that.

  • i had posted a different how to question a while ago. this answers it amazingly thank you majin dono

  • ok, bare with me on this...

    i have a game where a car hits a ball, it goes into the goal, woo you score.

    now i want an enemy car that pushes the same ball into your goal...How? lol

    i was thinking something along the lines of work out the angle from the ball to the goal, then move the AI car behind it and then set the angle to the goal position and drive forwards... but .. rrr ... if theres any better suggestions i would appreciate the feedback. I'll edit this as i tinker

  • ooh, i like this. alot of ways to go about it though

    to make navi follow link in a fairy fashion, pin it rope style to link when on contact, make an animation of her fluttering to boost this effect.

    i would probably suggest working out a targeting system like the z targeting in Oot

    once a unit is "targeted" un pin Navi and activate her (how you do this is up to you) 8direction/pathfinding/bullet

    to fly to the enemy (give her VERY high speed).

    again, when she reaches the enemy (on collision) pin it to the enemy, and have a new animation where she goes red and fly's around angrily. actually i think that was only when she targeted Sakon the thief

    then when targeting is off, or the enemy is dead, or as an else clause have navi pathfind back to link, and again on collision pin

    if you don't want the z targetting, you could just have a boolean if the los from link is true or not for each enemy.

    to decide which enemy she fly's too is a bit more complicated.. you could just pick an instance where the boolean is set... i'm struggling with the pick nearest/furthest event personally, so wouldn't try telling you to do it, just doesn't seem to do anything

    if you struggle still, write me back and i'll try to code it.

    i write this as i'm very lazy at following links and don't like downloading things (sorry Majin Buu)

  • 1: you legend, this seems good

    2: maybe refresh layout or something like that after a block is destroyed. otherwise it may be working, but not for the second instance without it being reloaded..... this will of course make EVERYTHING you do reload :/

  • ok... if your using unity, why bother with construct 2?

    granted, im using construct 2 caus its easier to make sprites so i digress

    you can have the hit box using the bottom icon on the sprite art image (not for the tiled background)

    also you can edit this to have an auto detect hitbox on the properties for the sprite (so circles)

    you cannot have multiple hitboxes on one sprite, but you can have several sprites pinned together with hitboxes in different places

    hope i understood your question correctly... i have no idea what a smtelse is

  • need a for each (enemy)

    then a branch to the code

    its a real ball ache to compare several instances i know... the rts demo is the best (most confusing) example

    but when you understand it, its only a slight ball ache

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • i made this as a game, works ok... it does seem a bit slippery slidy ice floor though...

    i added an else clause

    my code exactly is:

    on start of layout - gravity set to 0

    every 0.00009 seconds

    -----is in touch-rotate 5 degrees towards touch x,y

    -------------------- Apply physics force 5 towards touch x,y at image point 1 (the rear)

    -----Else- (car)set angle to car.angle degrees (this stops the car spinning randomly)

    the physics for friction is all u dude

  • i wrote so much, got logged out.... rrr... damn forum

    the easiest way would be

    every x seconds spawn enemy at x=random(5,50)

    give the enemy bullet behavior

    and

    enemy on created set angle to 180 (so it flys down not right)

    as an addendum you may want to either rotate the enemy sprite so its not flying sideways or have a separate bullet behavior on a square thats opacity = 0 then pin the enemy to it, this can be complicated but the rts tank example gives good example on how to do this for multiple items

    don't forget to destroy the sprite when it leaves the layout to save on lag

  • as an event

    score=score + (1000 - round(time))

    just typing "time" counts as the game time from start of layout

    round stops it from being a decimal.

    if your aim is to get to 1000, the more time alive, the larger the score added

    score is a global variable

    as an event : every (1) second --------- score = score + time

    then have a text box somewhere with the event: everytick---------text set text to ""&score

    this will make it so on 1 second, 1point is added ----score=1

    on 2 seconds, 2 points are added ---- score =1+2 (3)

    on 3 seconds, 3 points are added --- score = 3+3 (6) etc

    the other thing i typed would add a value thats less every second....

    1second score= 999

    2seconds score=999+ (998) etc

  • add a sprite on top of the enemy, every tick set position (not angle, just position)

    this way you have a pathfinding floor piece, and a image of the enemy on top

Aher0's avatar

Aher0

Member since 1 Jan, 2015

None one is following Aher0 yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies