Aher0's Forum Posts

  • 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

  • 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

  • do you not still have the email they sent you upon purchase? search your inbox for the same email address they used when requesting your transaction ID

    or... bump.... i did do this a while ago when i miss placed my licence details

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • woof... i recons you have a few ways to solve this.

    ideally i need to know if your scaling the background image on the construct 2 screen (in which case you are left to move things individually

    else, if you are scaling the background object in the game i need to know if the background is a single object

    you could add loads of image points on the background (grid i assume) then assign a variable to the pin points, on start up event set position THEN pin to the required image point

    or have an event that happens after the scaling is finished to reset letter positions to the image points

    i think if i was doing what you are doing, i'd have lots of sprites as background tiles. 2 colours, so if you have blacked out squares nothing will pin.

    if the image is white, it allows the clicking operation.

    on click letter tile, set a global variable to show what letter is selected, then on click a white square, add the variable to the white's own variable

    if white variable =1

    white spawn sprite(A) image point 1 ect

    i know this is more of how i would create the crossword than how to fix your problem. put pins are useless if not already in position, try an "anchor" guide also

    hope this helps, if your looking for a code to work out the increase in size relative to the position.... there are easier ways to set positions

  • not sure what your game looks like.

    you can spawn an enemy to a position (or a random position) of your choosing (i use spawn-ers)

    are you doing it in a single straight line vertical or horizontal layout?

    if vertical you could just spawn the enemy at the top of the level, and let it fall, with add input left or right depending on where the player is. Then on contact, destroy it/ - score, or whatever you want

    if horizontal layout: you could have the enemy simulate a jump if the player Y > than the enemy y.

    this works if the player has the platform behavior, give the enemy the platform behavior but cancel the keyboard input on its behavior settings

    (don't forget to add a for each enemy (possibly is on screen) event so it affects a single enemy not all of them.

    also destroy the enemy when it fall behind the player by a set amount

  • have sprites with solid behavior that get in the way?

    my answers usually involve adding physics to it.. which causes more problems.

    else you could have conditions , like a left wall and a right wall, on overlapping one push the car back on course

    what behavior does the car have? you could just set the speed/acceleration depending the terrain sprite the car overlaps

  • have a compare game time event.

    on gaining the points score=score + (1000 - round(time))

    at least that would be 1000- (1 per second of game time)

    can be reversed so you gain more points the longer you are alive for if that helps

  • 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

  • I forgot to add

    sprite.variable=0 ________ play animation

    sprite.variable=1________play animation1

    also, could just do

    on click/touch sprite__________________play animation1

    animation default is playing

    on click/touch sprite__________________play default

    animation animation1 is playing

    LittleStain: you are right, however if you wanted more than 2 animations to cycle through. a Boolean wouldn't cut it

  • wow, i hadn't even realized you answered me.

    turns out my mid point was just off. thank you *sigh

  • have a variable on the sprite, so on click the variable is added or subtracted.

    then have animation play on variable = 0, or 1

    add a wait function after. otherwise it can be prone to doing both actions on click

    on touch, sprite ___________ set variable =1

    sprite.variable = 0 _________ wait 0.2 seconds

    on touch, sprite ____________ set variable =0

    sprite.variable = 1 __________wait 0.2 seconds

    this should allow multiple instances of clicks too!