0 Favourites

My Death Platoon Question Dump

This forum is currently in read-only mode.
  • Hello i plan ta ask all my question related to my project Death platoon here

    http://www.scirra.com/phpBB3/viewtopic.php?f=4&t=2069

    So anyhow can find help here.

  • First question:

    what is the best way to keep an object at a certain distance one to another.

    For instance i dont want my target to get too close of my player. so i tought adding a circular invisible sprite at the same pos as my player to act as a collision zone that intereact only with my target...

    What do you think?

  • First question:

    what is the best way to keep an object at a certain distance one to another.

    For instance i dont want my target to get too close of my player. so i tought adding a circular invisible sprite at the same pos as my player to act as a collision zone that intereact only with my target...

    What do you think?

    I think that in some situations, more simple way is just test if the distance of the objects is under/over a certain threshold. The function is distance(x1, y1, x2, y2). In my opinion, there's no need for unneccessary sprite clutter if it can be done easily via events. :D

  • Drasa's right, if you can do it easily without collision events then that's always better. The distance expression is just one line of code, so it'll be easy to implement.

    +For each enemy
       +distance(enemyX, enemyY, playerX, playerY) is less than 100
         -> move away code (or flag)
       +else
         -> move towards code (or flag)[/code:2i585vw1]
    
    where 100 is the number of pixels radius you want.
    
    You might need some sort of intermediary event to smooth out the moving towards/moving away actions though, or your enemies might jitter back and forth at the edge of the boundary.
  • OK i might sound stupid but should i test it.

    anyways i'm tired and my brain is off so .. yeah. thats normal.

    Daily Build!

    -Mainly graphic .

    Animated level Yeah!!!!

    -more enemey.

    <img src="http://www.bordeleaudesign.com/Dump/DeathPlatoon/Marketing/DeathPlatoon08.jpg">

    bleh

    http://www.mediafire.com/download.php?n5zyy5yzqzr

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • wow hey how can i edit my post. Except the one i just created i can''t edit any.

    Sorry guys i realised what i wrote did'nt make any sense.

    Ok so to reformulate, where should i put this code Deadeye.

    I'm pretty much working on trial and error now and is slow as hell.

    But at still i learn a lot.

  • I don't know where you should put it. It's just a concept. You'll have to figure out how to implement it, because you know your code better than I do.

    And if it doesn't exactly fit with what you have coded then you'll have to figure out how to tweak it so it does.

  • ahh . oh okay then, i didn't realise it was pseudocode.

    Well i'm gonna try to find it right away

    [quote:sal76gga]because you know your code better than I do.

    your mother never told you not to tel lies.

    BTW do we have somewhere a list of all those function understand by construct. Like the Distance one?

  • BTW do we have somewhere a list of all those function understand by construct. Like the Distance one?

    http://apps.sourceforge.net/mediawiki/c ... sions#Math

  • super duper thanksalotman!!

  • Just a random question.

    Is it knowed that sometime Event sheet editor's icon can go haywire and switch place randomly?

    if not i think i'll report this as a bug.

    Someone know how to solve this?

    Another one:

    why when copying & paste my paste, the object is pasted like anywhere?

  • Is it knowed that sometime Event sheet editor's icon can go haywire and switch place randomly?

    I've seen this before briefly - saving, closing and reopening usually fixes. If it doesn't, submit a bug report (and post the .cap if you can).

    [quote:w0sxxl1w]why when copying & paste my paste, the object is pasted like anywhere?

    I've never noticed this. Can you reproduce it?

  • Both of those errors happen regularly for me. Next time the images switch around I'll make sure to send up the example.

    As for the copied events pasting... well anywhere they want to choose to I can't seem to pin down a source. Sometimes it goes haywire, others it works as expected.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
353 32,110
yojona's avatar
yojona
Unread sticky
192 1,337,469
Kyatric's avatar
Kyatric Construct Team Support
Unread hot topic
49 6,349
PrinceofMars's avatar
PrinceofMars