dop2000's Forum Posts

  • You do not have permission to view this post

  • Use Timer behavior. On collision start the timer for 1 minute. In "On Timer" event check if the character is still overlapping the object.

    You may need to add other checks - for example if a second collision happens, continue running the timer without restarting.

  • You do not have permission to view this post

  • Change the code in that demo like this and you will be able to control the carousel with keyboard keys. It already shows the name of the selected image, you can figure out yourself how to add other stats.

  • You do not have permission to view this post

  • I prefer using mostly triggered events and Timer behavior (instead of Wait). Triggered events usually start with "On..." and they have a little green arrow icon on the event list.

    There is nothing wrong with using state variables, or a combination of both, but you need to be careful with when and how you change states. For example, on your screenshot in event 4 the Pawn after arriving will still have todo="getbox" for a full second. During this second it will probably try to find the path to the same box several times. Which may trigger the "On pathfinding arrived" event several times and mess the things up.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • May be because of this change in r195:

  • It works perfectly fine in C2 r277 and C3 r195

  • You need to use a family -> "For each Cloud, Cloud is overlapping CloudFamily". But be aware, that instances are not destroyed immediately. So the loop will destroy all overlapping clouds if you don't exclude already destroyed instances.

    I think it will be easier to do in "On created" event:

    Cloud on created
    Cloud is overlapping CloudFamily
    CloudFamily.pickedCount>2 
    	: Cloud destroy
    
  • Also, check out these demos:

    howtoconstructdemos.com/two-virtual-thumbstick-capx

  • Never use "trigger once" with objects that have multiple instances! "Trigger once" doesn't work per instance, if the condition is true for one instance, all other instances will be ignored. So remove it from events 2 and 5.

    You should pick the nearest pawn On start of layout and set its state to "getbox".

    Also, add "Pathfinding is NOT moving" condition to event 5. Move event #6 from sub-event to make it top level event. In event #7 immediately change the status to something like "delivered", otherwise this pawn will try to find a path for delivery again.

    .

    You are using "state machine" code, when you are assigning different states to pawns and check their states on every tick. I am not a big fan of this method, but if you are planning to use it, you should be very careful with how and when you assign states. And again - never use "trigger once" with such events.

  • It has nothing to do with local storage. right(text,1) expression takes the last character from the text. So if your text is "mykey7", it will extract the character "7". Then the int() expression turns it into a number 7.

    If your text is "mykey17", it will still only extract the last character!

    So if you want to have double digits in key names, you need to use right(text,2). But you also need to add an extra zero in front when the number is less than 10, use zeropad() expression for this.

    Local storage set key "mykey" & zeropad(imagenumber,2)

    this will generate a key like "mykey03" or "mykey18"

  • Save the type in a local variable. Then use "System pick All sprites", then you can pick all sprites of this type and turn them blue.

    Bullet on collision with Sprite
     local variable type
    	Set type to Sprite.Type
    
    	System pick all Sprite
    	Sprite compare instance variable Type=type	
    		Sprite turn blue
    
  • Are you using Firefox? This might be the same issue as in this post:

    construct.net/en/forum/construct-3/how-do-i-8/wrap-text-construct-151645