Davemon's Forum Posts

  • "Append" by definition means to add. =) It's just a way to alter text without overwriting any existing text, just like a word-processor.

  • for each die=face --> add 1 to variable.total

  • Use a variable. =) Probably an instance variable in the target. When the target is acquired, set the variable to "targeted" or "target=true" etc. I assume by "targeting" you mean it has line of sight, so just pick the first LoS instance with a "Targeted" variable of "false" and set its UID in an instance variable belonging to the turret. When the line of site is lost, pick the same target referenced in the instance variable and set it's target variable to un-targeted or false. From there,only perform actions on line of site targets with targeted variables set to false. If it's true, keep searching. I'm not testing this in the editor, so feel free to post anything that doesn't quite work and I'll help tweak it.

  • Touch > is in touch
    _____Touch > is touching sprite > set text to "It's a fish "str(sprite.IID)
    _____Else > set text to "It's a fish!"[/code:6a0l5vhg]
    
    If that's not helpful, maybe you could go into a bit more depth on the goal? When you say the player slides back to a previous sprite, does the text revert to neutral (per my example) or change again depending on which sprite is pushed? In which case I recommend a callback from an instance variable.
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • every "5" seconds

    Pick a random "spawner" instance---> Spawner:"Spawn object Enemy on layer:SomeLayer"(imagepoint SomeImagepoint)

  • This is good for quick games, but for longer games, sometimes you need more control over individual items. Imagine Samus in Super Metroid. We want her position to persist, the enemies to reset, and the powerups remain collected (persist). Otherwise a missile or energy tank could be re-collected every time the area's persistence was reset. It's also a bit easier to track when you have a boatloat of objects. Persist and reset persisted objects are still very important, but there are occasions when the extra control is essential.

  • Set a few instance variables in your player's controller sprite (or, if player isn't global, in an invisible global sprite's instance variable or even a global variable). Name them something like "StartX" and "StartY". Set them as numeric and make them static (static is only important for local and instance variables, not for global). When you leave a layout, set the variables to the x and y (respectively) of the spot you want them to enter the next layout at. You can do this just before the "go to layout" action. Then, on the layout start, make the player's x and y = the variables StartX and StartY values. This way, you can start anywhere you want from any layout, including your menu. It's like creating a landing pad.

  • Have a quick look at the skeleton's sprite object and make sure the speed and loop settings are correct. Sometimes that does it. Check out the frames as well as the complete animation and make sure it's not 0 or something. Also check to be sure the animations are correctly named and referenced (watch for case sensitivity, too!)

    In reference to your events, if you're telling it to play animation Default at the event beginning, it will probably keep changing back to default as long as the conditions are true, despite what the sub events say. Set the default animation when the skeleton is idle. Then as a separate event, set your AI conditions and actions.

    Skeleton is on screen (not necessary, but can be used with sub events under it if you're worried about performance)
         Player X > Skeleton.X Skeleton  Skeleton set animation to "Walk"(play from beginning)
                                         Skeleton Simulate 8Direction pressing Right
                                         Skeleton Set angle to 0 degrees (<-- I wonder if you might be better off with an invisible controller sprite, but that's another tutorial)
                                         Skeleton Set Mirrored[/code:qz68hz7v]
    
    I hope that's helpful. I suspect the answer lies in your first action, set animation to default.
    
    --Edit: I see the forum removed most of my formatting, so I put it within a code block. hope you can still tell what I'm doing here.
  • I recommend using two objects, a non-global that is destroyed, and a sprite object in your inventory with multiple frames to represent what you picked up (which is global). Instead of moving an object, use variables (or again, arrays/dictionaries) to reference it.

    Game design is like a magic show. Don't think so much about what is happening, but rather what appears to be happening. Think about many different ways to achieve the same goal, and pick the most efficient. In this way, you'll find there are always things you can do to improve your work and grow as a designer.

    TLDR: Don't move the object, make the player feel like the object moved.

  • Rather than placing a landmark at each ledge, consider adding an invisible sprite attached to the lower front of your actor to detect ledges. Place it below the bottom edge and set it's position (or pin if you prefer, I tend not to use pin as much) relative to your actor. When the detector is no longer overlapping a floor, it means a hole is directly in front. Similarly, you can set a detector above at max jump height. If the actor reaches a wall, and the detector is not overlapping the wall, the actor could jump instead of turning around.

    Using detectors on your actors is a great way to build logic without using too many objects all over your levels.

  • Morning, all.

    I have a few asset/system packs that have been useful to me, and I'd like to distribute them soon. The latest is a health pack that includes Zelda style hearts and life or mana crystals (with full, half empty, and empty animations), numeric health/mana system values with a spritefont (which includes things like arrow keys, space bar, and spec keys if you decide to use it for a customized config), and a variable health/mana bar --all of which can be used together(redundantly) or separately, and will update dynamically with your current and max health variables. (Or mix them for additional mana or stamina, exp, whatever you like.)

    My question is, I'd like to set them up as a "Pay what you want"purchase. If you're new and poor, just grab them and their assets and use them freely. If you want to support me, hooray! I'm motivated to post and make more!

    Any interest/possibility to set a pricing system like this up in the store? Has anyone else expressed interest in this?

  • You might consider this action RPG engine by vybr

    https://www.scirra.com/store/royalty-fr ... ngine-1901

    There's a demo to try; it's quite cute and seems flexible. It's not Zelda, but it's ready now, and has a lot of potential.

  • Remember, "on overlapping" is just a condition. =) You can give it many actions from there, including re-positioning.

  • Most of that will be handled with animations, but the move function could be handled a few ways.

    You could use LERP when the bad guys overlap a vacuum hitbox sprite.

    "badguy" is overlaping "hitbox" > set X to (self.X, player.X,5*dt)

    set Y to (self.Y, player.Y,5*dt)

    Adjust 5 in 5*dt to a number that fits your sprite size and scale, it's the speed the bad guys will move.

    Or you could use bullet behavior on the badguys, which is closer since you can control acceleration. Set the default speed to 0 and the acceleration to about half what speed will be. (say 30?)

    now when the bad guy overlaps, you can move it toward the player with increasing speed as they are trapped in the vacuum longer. For this, I recommend an invisible control sprite, since you'll need to control the angle of the badguys, and you may not want to spin the actual animated sprite. A control sprite is really recommended for most actors in a platformer with any complexity.

    Check out some platform tutorials if you're lost on the basics, but I'm happy to help as well.

    In the case of bullet behavior:

    "BadguyController" is overlapping "Hitbox" > set angle toward (player.x, player.y)

    set bullet speed to 60

  • "Object": is overlapping "Object" > "Object" destroy.

    Alternately: > set "object" x:self.x+somedistance (Ie self.x+32)

    No loops, variables, or arrays. =) Often used for top down SHMUPs.

    Also, don't forget to destroy your objects if their Y becomes greater than viewport:bottom! =)