SoldjahBoy's Forum Posts

  • You could also maybe not *completely* pause the game... just set timescale to a very low amount (like 0.001 - or something) and have a wait time there to suit. It would be such slow motion it would appear paused, but not really be paused. Maybe?

    ~Sol

  • As oosyrag has said already, use an invisible sprite as an "attack area" - or you can use a few math things like; is overlapping at offset *and* is angled towards the player *and* is playing attack animation - things like that.

    The most common way is to have some kind of sprite used as a "detector" object though.

    ~Sol

  • Yes sometimes using a separate object can make like easier. Instance picking can be difficult sometimes, especially when you have a lot of actions going on (like dragging and dropping while colliding - under specific circumstances).

    I would say that 50% of problems people have with using C2 end up being instance picking related - and the other 50% of problems are usually still something to do with instance picking, lol.

    Glad you fixed it though

    ~Sol

  • That should work, unless you have some other event or action that's setting the width to something else... in your loop though, every object would be resized to the same size - since it would be picking every instance of that object and resizing it (so maybe it is working but they're all the same size and probably overlapping?)

    You will need to add a way to only allow the resizing to work once per object - so you can have a boolean instance variable that changes to on or off (whatever your preference) and add that condition as a sub event to your loop and move the resize action to that sub event - and make sure you trigger the boolean change after you resize so it doesn't resize each time the loop is run.

    Hopefully that makes sense.

    ~Sol

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh I see okay...

    All you need to do is have a global variable that is set depending which character you choose...

    Character1.sprite is clicked

    --- Set GlobalVariable.CharacterPicked = 1

    Character2.sprite is clicked

    --- Set GlobalVariable.CharacterPicked = 2

    Character3.sprite is clicked

    --- Set GlobalVariable.CharacterPicked = 3

    Then when the game starts you spawn the character you want, based on the value of the global variable.

    GlobalVariable.CharacterPicked = 1

    --- Create object Player1.Sprite

    GlobalVariable.CharacterPicked = 2

    --- Create object Player2.Sprite

    GlobalVariable.CharacterPicked = 3

    --- Create object Player3.Sprite

    Hope that helps

    ~Sol

  • Damn Daniel... this is coming along amazingly - and so fast!

    ~Sol

  • I finally had time to check into this and noticed it's been resolved.

    Glad that it was worked out.

    ~Sol

  • Can you correct it? please https://www.dropbox.com/s/kr0c5v2drwg7x ... iable.capx thanks

    When I have time, I will take a look. Please be patient.

    ~Sol

  • You can also add a "camera" object to your layout, and have that move around a big layout - scrolling the layout inside of the window.

    System -> Scroll to object

    ~Sol

  • Looking way cool!

    I have some problem though - the rain always falls upsidedown - goes from ground to sky instead of sky to ground :/ (using R227)

    Also is it possible to make the different effects turn on/off? So you can have rain only, or fog only, or both at once (like now) - and perhaps an option to hide the moon if I want to use a different graphic style for it?

    This is damn impressive though, even just like it is!

    ~Sol

  • Sorry I'm just really confused now... it started at bullets and now it's about cars?

    Can you post your capx of your project so I can take a look at what's going on? I don't know what else to suggest or do, because I don't get what you're trying to achieve.

    ~Sol

  • mudmask

    I used the exact method that R0J0hound posted up... check for overlap at offset on 4 vectors to determine which sides had water on them, or in my case I was checking for open "air" since my generator was a side view platform thing - but it's the same idea and method

    ~Sol

  • I checked, I can't see any picture there, just the same question you posted here.

    Is it too hard to put the picture here?

    ~Sol

  • Okay, it sounds like possibly you need to have two cameras... one that follows the player when needed, and the second camera that strictly controls the screen panning.

    You can change which camera is being followed when the screen pan needs to come into action.

    If you want to keep your screen relative position (so it doesn't 'jump' between the cameras) you would need to do a little math, offsetting the coordinates of the current position of the player camera vs the pan camera. You can track the position using instance variables, and do like; Follow object PanCamera.x-PlayerCamera.X (and same for Y).

    Something like that should give you the result you're looking for, I think.

    ~Sol

  • Are all of your "screens" the same size between the camera pan transition? Are all of these "screens" contained on a single giant layout or are you using different layouts? Are you panning the camera to a new location in said layout, or are you moving the "level" around the viewport to give the feeling of scrolling through a giant level?

    I guess knowing a little more about how your game is set up would be beneficial to making a proper suggestion.

    Without knowing any of those things though, perhaps having a "state machine" set up for the player positioning - so you have for example;

    --------------------

    GlobalVariable.PlayerPosition = X (can be X or Y depending on your desired screen exit point)

    ScreenState=1

    (if)ScreenState=1

    (and)PlayerPosition=(desiredvalue)

    --- Scroll camera to X,Y

    --- Set ScreenState to 2

    (if)ScreenState=2

    (and)PlayerPosition=(desiredvalue)

    --- Scroll camera to X,Y

    --- Set ScreenState to 3

    So for each of your screens, you're creating a custom "trigger" point that will cause the camera to shift X,Y coordinates to display your next area. Using this method you wouldn't be restricted to a set size for each "screen" - but you may be restricted to having one exit point only (or you could add a second variable to any specific screen state to compare X and Y, not just one or the other).

    As far as the scrolling thing goes, you can move the camera with lerp(camera.x,desired.x,1-0.2^dt) (and same for Y) for a smooth but fairly speedy transition. Rather than attaching the camera to the player itself - you would be setting this to hard coordinates on your map.

    Hope this helps

    ~Sol