Badmiracle's Forum Posts

  • I am trying to use the same TURRET object for both the player and the enemies. Using the Turret Behavior, here is what I have so far

    Code: Select all
        System | Pick TURRET instance 1
        --- TURRET | Add Turret target TARGET[/code:18xxg6ev]
    
    The issue is that it adds TARGET as a target for all of the TURRET objects on screen (not just the "nth" instance of the object). This would mean that the Players TURRET object will attempt to target itself.. It appears that Add Turret target is a global action, regardless of the objects picked in the condition.
    
    This is a request to fix this limitation of the Turret behavior that we all know and love!
    
    Thanks.
  • Badmiracle

    Ok here's a capx how to do it.

    https://dl.dropboxusercontent.com/u/542 ... aster.capx

    The idea I posted was on track but was flawed.

    For tilemaps, it's enough to move the area you want to paste onscreen and move the paster by the same amount.

    For particles that wouldn't work as moving particle objects doesn't move the already spawned particles. The solution was to save the particles position when it was created then move it to the center of the screen.

    Yes x1000

    R0J0hound Are they paying you yet? Scirra

  • R0J0hound

    Could you explain in a bit more detail? Sorry I'm awful I know.

    Here I am trying to redraw the "Sparks" particle doing what you said (but I don't think I followed correctly) - Whatever I try seems to crash the browser

  • For each turret, check its angle

    If Turret.Angle > X => Set Turret.Angle to X.

    Do the same for the other side of the arc.

    any good to you ?

    https://goo.gl/jzkHSP

    Both would work. Thank you.

  • R0J0hound Any ETA on the Particles not drawing off-screen fix?

    I really wanted to use Paster for Splitscreen, but Particles aren't being drawn as soon as I go "off screen". Could you let me know of any good alternative workarounds?

    Thanks in advance. Great plugin btw.

  • Generally is it better practice to use 1 Bullet Object and adjust the animation frame, Speed, Acceleration, etc.. right after it is created OR to simply use Multiple Bullet objects?

  • I would also like to know how to limit the Turret Arc to say 90 degrees. I have done some searching and I believe that this Thread had the solution but the CAPX example was removed:

    Thanks.

  • I did yes, but the objects are stacking on top of each other instead of overlapping in the way that I want.

    A sword is flat, so I want it to be treated as such, and have other swords overlayed on top of it if they are dropped on top of it, instead of having the sword stack on top of other swords (I hope this makes sense).

  • Hey guys,

    I have been working on a feature for my Platform-style game - the ability for the games character to drop items. Since Platform games seem rather prevalent in the C2 Community, a solution may be beneficial to everyone.

    What I am trying to accomplish using the Physics behavior is to have the dropped items fall realistically onto other dropped items that are already on the ground.

    For example, if I drop a Sword on top of an Axe that is laying flat on the platform, then the dropped Sword should not stack on top of the resting Axe, but instead overlap it - while realistically disturbing the resting Axes position subtly as well as the Swords position on contact.

    By "realistically" I just mean something that looks natural.. for instance a random adjustment to the objects angle on contact as well as possibly a subtle force put on the object in a certain direction.

    I have been toying around with the different Physics features for sometime now and I just can't seem to get something that looks good. I had done something that sorta worked but became less and less realistic as more objects were being dropped.

    Note: Gravity is disabled in my game, and instead I apply a downward force on all objects being dropped. This is because my game isn't really a traditional Platformer (it looks like a Platform game but the character is able to move up and down as well). Additionally, I intend to make the Sword object part of a Family.

    Help is always appreciated. Thanks everyone for reading.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am working on a way to get my Spriter characters Eyes to rotate based on the Mouse location.

    The way I've done it is I've created 2 action points in Spriter over the eyes and spawned non-spriter "Eye" objects in both of the action points. Then I've pinned the 2 Eye objects onto the character in the location of the action points.

    The issue: it seems like the position of the Eyes lags a bit behind the characters movements.. (the position doesn't stay locked as the player moves) in addition to that the Z-Order seems to be an issue, as I can only place the Eyes above the entire character, or below the entire character (the Eyes need to be in-between - behind the helmet but above the face)... so I was wondering if there was a better way?

    Also I am not sure if this is an issue with Spriter or not but adjusting the Z-Order of any non-spriter objects in-between my Spriter objects "sub-"objects doesn't seem to work.

    Any help is always appreciated. Thanks.

  • RamPackWobble What X & Y would I then move the NPC to, to be within 500 pixels of the Bullets creation point?

  • The object I am trying to figure out the previous location of is a Bullet that uses the Bullet behavior.

    An NPC needs to be able to move a set distance (say 500 pixels) toward the point (X,Y) where the bullet was created/fired from (this NPC uses Pathfinding).

    I am trying to do this without taking into account the current location of the bullet (my check for the Bullet position doesn't happen every tick due to the sheer amount of bullets on the game screen at any time). So my question is - is this even possible? We know the location of the NPC and the Angle of Motion + Distance Traveled for the bullet.. how do we determine the X and Y that the NPC should move toward?

    Thanks.

  • Another thing you can do(I will hopefuly make a tutorial for this), which is something I'm trying to do right now, is to only use the pathfinding behaviour for finding a path from point A and point B, and, instead of moving your object using the pathfinding, you can try and use 8 Direction as it has built in collision checks, and will collide with solids properly.

    tarik00555, another member named zatyka has already done something like this but with the bullet behavior (so maybe this will help): pathfinding-experiences_t81496

    Direct Link: https://dl.dropboxusercontent.com/u/475 ... ement.capx

  • Here you go.

    Create a global variable "Random Timer"

    Create 3 separate Events

    Condition: On Layout start

    Action: Set variable Random Timer to "round(random(a,b))" where A is your min number and B is your max number. This will select a number between the two.

    Condition: Every 1 Second

    Action: Subtract 1 from Random Timer

    Condition: Variable Random Timer <= 0

    Action: Do what you want here..

    Edit: Added Round Expression. Thank you for pointing that out RamPackWobble

  • Bump