mystazsea's Recent Forum Activity

  • leomachado666, you might need to add more information...

    you havent really shown us what you are trying to do..in the overall plan of your game..

    there are so many ways to change players views and swap out images or animations...

    you might need to break it down to simplistic form first then expand on the idea..

    As far as I know.

    one object sprite cannot call another object sprites specific animation view ..unless they are named the same per object..but it runs into troubles if you dont use Families..

    https://www.scirra.com/manual/142/families

    I would suggest that you make a Family of sprite objects that are all the character object sprites..

    This way you can call each family members animations by the same family name and it should work perfectly across the various classes of character..

    Does that make sense?

    use Families, its this kind of thing that Families are specifically used for ..

    groups of similar objects that you want to all affect with the same rules or events

    Each object sprite has its own animations ..but im pretty sure the animation names can be shared across different sprites....

    So you can just swap out several object sprites quite easily...but you need to make sure that you can call the right animation for the right object at the right time, in relation to the Family its in

    You are going to need a system that can handle that request....It might take more planning out than you have done so far...

    So first off, you would need an invisible platformer controller object with some instance variables that represent the player classes

    such as

    1-archer

    2-monk

    3-builder

    4-monkey

    etc etc

    Then you need a check to see which variable the player selected

    and then spawn the correct object sprite(with its animations) at the player controller sprite

    of course you may need to destroy the older or existing object character sprite ..

    then you need a way to trigger the right animations across the different sprites no matter what class is selected.

    ive done it before...by having a character menu screen but this is not the only way..you might want to swap character class in game...

    so if the player chooses archer you would would just check what the player chose by looking at what variable was selected and then create the required object (with its unique animations) at the player controller location and pin it..

    By the sounds of it you need to plan out your systems and code structure before you go doing things like this..

    Its always better to build systems that control your events rather than just dropping in events

    what I mean is..

    plan out and create a system that handles the player changing mechanic that you are trying to make

    its all about systems

    you need structure and a good plan to make it work...

    things I would consider are

    1- How does the player chose what class eg: is there a player select screen or is it done in the action part of the game or via a shop or whatnot?

    2- make sure the system is streamlined and optimised so that it doesnt take up all the processor time to swapp out the player objects..

    3-make it robust as well

    Basically you would need to elaborate alot more before you could get the best answer..

    but yeah....try swapping objects by relating it to a variable that tracks the players choice of character either in game or in menus...

    sprite objects can have unlimited animations im pretty sure so use the right object for the right job and you should be fine..

    hope that clears something up

  • Hey ijoin, there are several ways to do this..

    a quick way is to use instance variables

    presuming that your popup is an object...goto its properties and add an instance variable

    make it a Boolean and then give it a name like "Playe_ticked" or something that you recognise

    Then you can add an extra action to the Player clicked on "never show it again for me"

    The action would go anywhere before the popout action that you should already have for the popup..

    and it should trigger the Boolean instance variable that you just made for the Popup object and set the BOOLEAN to true...

    then in your other condition that makes the popup initially trigger you should place another "Condition"

    that checks if the Boolean has been triggered or not

    this way the popup object event will not occur if its been ticked by the player..but should trigger if it hasnt

    Hope that made sense..

  • Yes pirx , Windwalker is right....Once you have picked up your object you can restrict the motion of the Cursor and object to any location you like or even snap to a location by clamping the Mouse or objects coordinates..

    Its probably the best way ...

    another way might be to assign a solid behavior to the object and have a invisible solid border ...and PIn the object to the mouse cursor sprite position with a ROPE style pin...But i dont think this is as reliable as clamping ...

    but it depends on the feel and requirements you are after...

    each game is different and has its own unique mechanics..

    like everything ..just play around to you find what works best for you..

  • UM ok....welll its hard to figure out ..but things I would change considering its a spaceship are.

    1- in the system every tick event --> there is no need to pin objects like the thrusters here because PIN already is an every tick function...

    you should make a new event before this everytick event

    System -> on start of layout ....then place all of your pin actions here not in the every tick event

    also make your PIN action( position only) rather than rope style..pretty sure that will help alot

    because rope style is for having something drag behind the object its pinned to..

    Position only style will allow rotation of the thruster relative to the Spaceship hull and allow directional vectoring

    2- it seems you are NOT really using the Physics motion for the thrusters..

    YOu may of wanted this as a feature its had to tell from here ..but normally if you press w to thrust forward..

    what you would do is rather than move the thusters 2 pixels instead use the physics behavior to "apply force at angle" while "w" is down. this will give you the thruster like movement that I think you are after..

    also....one other way would be to ..

    on "w" pressed...apply a uniform physics force to all engines...

    then when you hold "q" or "e" down ->apply an extra physics force to the correct and relative thruster.. eg: q for left or e for right thruster or reversed

    this way..you would still have forward motion but the additional physics force on either the left or right thruster would or should slightly turn the spaceship in the direction you want..

    but yeah first off i would fix the every tick functions and make them -> on start of layout..

    pin behaviour is already every tick...no point doubling up on commands for your processor if you dont need to...

    youll probably find it works alot better too if you pin (position only) rather than rope style

    somewhere on the tutorial page or in the example scenes in construct 2 is a test showing you how each PIN style works....im pretty sure its in the examples when you load a scene in construct 2

    hope that helps

  • You may want to look into Delta time in the manual it should give you the answers you need..

    https://www.scirra.com/tutorials/67/delta-time-and-framerate-independence

    hope that gets you started..

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Pandemonium, are you using the Physics behavior for the thrusters? or some other behavior...you didnt state how the thrusters affect the motion other than by appearing to be dragged

    some more info would be good.

    some details like ..are the thrusters triggered by key presses or mouse or touch etc?

    i would say some of the problems would be related to how your force or impulse(if you are using Physics) is applied and at what angle the force or impulse is applied.

    To restrict the engagement of the thrusters, just make an event that goes something like

    condition--->key press or whatever-->

    actions----->Left thruster-> is active

    ----->left thruster ->apply force at angle

    ----->Right thruster-> Physics set disabled

    but yeah more info is required to

    give better help at this stage ..otherwise at best we are guessing..

  • hey pirx Its a good question,but before we can try to give you a good answer can you be more specific..

    Some extra details would be appreciated ..like...

    What do you want the draggable object to do when it reaches the border of the restricted area?

    Do you want it to drop?

    Or just stop moving?

    Or is the mouse cursor movement restricted to an area as well as the object is being dragged..

    if you can answer some of these questions you might already have the answer you need..

    Each game is different so it would help if we knew exactly what you wanted to do

    otherwise we can only guess to what specific events or actions you would need

    happy to help out if you can elaborate on the matter

  • The WebNODe Plugin would do this by making an app that you can then call

    Browser plugin behaviors from as well to "bring to front" or "focus"

    ...or you could use the windows 8 plugin..

    and use the "Timer" behavior

    of course the app that you create must be compiled and running in the background in order to pop up at the times you require

    should get you going

  • Nice Kyatric....i might look into that...not bad prize money...thanks for the heads up

  • mm i dont know but id try looking into the AJAX and websocket plugins

    https://www.scirra.com/manual/107/ajax

    https://www.scirra.com/manual/153/websocket

    and then make your own form completion Text input boxes...it should be possible with a bit of research..

  • mmmm Good question

    I dont know if there is an easier way

    but personally id use Two invisible helper sprites connected to the touch function

    On touch spawn invisible helper sprite 1 at Touch pos X,Y and record this pos data in a Temporary variable

    and then somehow detect touch 2 and spawn second sprite at second pos X,Y and record that data

    then make an event loop or normal event to check to see if both sprites are on screen if so...

    if so..

    then check for "distance" movement between the two., x, y pos data ..if the "distance" is increasing ..zoom layout out

    if its decreasing ..zoom layout in...

    if no touch on the screen destroy sprites and clear any XY data stored

    C2 does supports Multi touch which is what you want directly....you could read up it here..

    https://www.scirra.com/manual/119/touch

    Hope that gets you started somehow

mystazsea's avatar

mystazsea

Member since 14 May, 2012

Twitter
mystazsea has 1 followers

Trophy Case

  • 12-Year Club
  • RTFM Read the fabulous manual

Progress

13/44
How to earn trophies