dop2000's Recent Forum Activity

  • If you build a graph with those values you provided, you'll see that it looks similar to y=1/x function. Only instead of "1" there should be a much bigger value.

  • No, I'm pretty sure that description is just a comment and you can't access it with events.

  • You are using "On Nth touch end". N here is not touch ID, it's the index! For example, if 3 fingers are touching the screen and you lift one finger, "On 2nd touch end" will be triggered.

    In your case you need "On any touch end" and then compare touch ID.

    Or simply use "On tap AreaSprite -> Buster Find path to (touch.x, touch.y)". That's it, just one one event, no need to deal with all those variables!

  • It's hard to find the exact formula, because your numbers are pretty much random, this is the closest I could make:

    spawn_rate = (200+speed)/speed

    You can add clamp((200+speed)/speed, 0.5, 15) to set minimum and maximum spawn rates.

  • I think "Array contains value" scans the entire array, you should not use it inside the loop. Try this:

    For each XY element
     Array Value at (Array.curX, Array.curY)=KeySlots.UIDofDoor 
     ---> Array delete index Array.curX
    

    You can also do this with normal "For" loop:

    For "x" from 0 to array.width-1
     Array Value at (loopindex, 1)=KeySlots.UIDofDoor 
     ---> Array delete index loopindex
    
  • I suggest doing this with MoveTo addon. Bullet is more suited for "shoot and forget" tasks. When you need to move object from one point to another predictably, with acceleration/deceleration, MoveTo is a much better choice.

  • tarek2

    Yeah, sorry, I realized my mistake and updated my post, but you had already commented on it :)

    .

    Yes, the "Else" will not run if at least one picked instance has Class & "_AtKR" animation. So the event should probably look like this:

    Pick AdventurerSprite with animation NOT EQUAL to Class&"_AtKR" 
    -> AdventurerSprite set animation Class&"_AtKR"
    
  • tarek2, I believe the "Else" event will be executed is there are no instances of AdventurerSprite (picked by parent events) with animation Class & "_AtKR".

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The first "Pick Adventurer where distance..." condition here is wrong. You haven't picked an enemy yet, so you are comparing distance to only one enemy instance (first instance with IID=0, which could be on the other end of the layout).

    I suggest you use "for each" loop:

    Adventurer state not equal "inCombat"
    For each Adventurer
     Enemy pick nearest to Adventurer
     System Is between values: distance(enemy.x, enemy.y, adventurer.x, adventurer.y) between 60 and 500
     ----> Adventurer set state "inCombat"
    

    .

    If you have lots (hundreds) of enemies and adventurers, calculating distances between them may be a bit slow. In this case you can use Line Of Sight behavior - it works faster than distance() expression.

  • On mouse click
    Ball NOT overlapping Wall at offset X:-20, Y:-20
    Ball NOT overlapping Wall at offset X:20, Y:20
     (all the sub-events here)
    

    Clicks will be ignored if ball is within 20 px of the wall on either side.

  • Would I be able to use break loop instead of the comparison, too?

    Yes, you can use "break" - add a sub-event in the loop, in this sub-event check if loopindex>1000, then break loop. But it's easier just to add this condition to the While loop itself.

    Also, since I'd like to have it happen on start of layout, cant this also be done in a single pass?

    You mean add two cells in one loop? Yes, it's possible:

dop2000's avatar

dop2000

Member since 26 May, 2016

Twitter
dop2000 has 257 followers

Connect with dop2000

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Forum Wizard Made 5,000 posts in the forums
  • Forum Unicorn Made 10,000 posts in the forums
  • x5
    Popular Game One of your games has over 1,000 players
  • x2
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • Enduring Visitor Visited Construct.net 90 days in a row
  • Unrelenting Visitor Visited Construct.net 180 days in a row
  • Continuous Visitor Visited Construct.net 365 days in a row
  • RTFM Read the fabulous manual
  • x3
    Quick Draw First 5 people to up-vote a new Construct 3 release
  • x13
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

28/44
How to earn trophies