mystazsea's Forum Posts

  • Hey awmace5

    I've had a look at your Capx...the reason is that your "TExt2" object( the ammo counter ) is outside of the window dimensions..

    in your layout the "text2" object is on the HUD layer but its coordinates are

    x1059, y20

    which is outside of the window view dimensions..which are 640,480

    change one or both of the window size dimensions or move the Text 2 object to inside of the 640 range and it should be visible

    you can use the ANCHOR behaviour to make sure that at runtime the objects are set to a fixed screen position..

    Hope that helps

  • Great Question Sashik...This info is a fairly common request..

    The short answer is that its pretty simple process to add a custom Transition that simulates what you may need..depending on the style of Transition you require...Some are more difficult than others to implement..but the basic transitions ...Fade to black or white, animated Screen capture transitions and other effects driven transitions are possible

    I tend to use a Separate layer placed above all of the others and make it visible when required..The layer can have anything from a simple Fade to black or white transition using a sprite with a FADE behaviour prior to changing layout .....and/or a more complex animated sprite object with WebGL effects..depending on the look that suits the project.

    Often its useful to include the same layer on all layouts so that the transition is mirrored on the new layout...

    You can create just about any transition you like using a combination of Sprite animations or Particle Reveal Transitions...

    I read a thread somewhere about a year ago in the https://www.scirra.com/forum/construct-2-general_forum31.html

    That mentioned that transitions coming soon..but yeah nothing yet....

    I find it much better to make your own ...because you have far greater control and can get very fancy animated transitions that perfectly suit your game style

    Hope that helps a little...

    There are also a few examples of simple transitions in the Scirra arcade under "examples"

    Some of these other useful links may help you

    http://www.scirra.com/forum/more-layout-transitions_topic42102.html

    http://www.scirra.com/forum/game-levels-transitions-not-so-easy_topic59789.html

  • We would really need to see your Event sheet setout for the Audio events to figure out what specifically is going on there..any chance you can post that?

  • The issues would be found how you have set up your Events to flow...

    Please post your Capx or event sheet screenshot so we can see whats going on and address the specific problem....What you explained doesn't seem to follow standard instance behaviour in Construct 2

  • Imchucho....I think you mispelled GOLD_ADD in the declaration phrase...

    could you recheck it and EDIT your post to correct if its a mistake.. or it may confuse other people who read this

    Perhaps also you could point out that it was a "Variable" that you declared would also steer people who missed what you did there in the right direction

    Not everyone understands programming ..but making it clear can help so many people grasp the basics faster..

    otherwise that was a perfectly concise answer...nice one <img src="smileys/smiley1.gif" border="0" align="middle" />

  • AI is a complex field as you know doubt are aware by now....

    Could you please clarify your question a little better..

    The enemies you speak of are instanced objects of the same entity yes?

    If you want complex AI behaviours you often need to create variables that control or influence the behaviour first in some way

    like a cascading flow chart..

    for example...having only one enemy attack if its close to the player is suitable for some games but not others or for other enemy types

    like a hive mind enemy

    to create specific actions you need to discuss what specific actions you wish to work on ...

    AI is a vast field of interconnected functions that affect and attribute to events in real time...

    its rarely as simple as adding a singular feature

    its about flowchart conditions that lead up to other events

    An Example AI flowchart would be

    Has Enemy detected player? yes/no

    if it did detect the player ..how did it detect player (method)

    if enemy has detected player what should it do next

    (pursue player or flee or some other action?)(Deterministic function)

    once deterministic function is calculated ( which can be done on a sliding table or scale based on values affected elsewhere)

    proceed with action every few seconds rather than every tick

    ( this allows realistic adjustment of actions that the player could respond to)

    So basically its a complex series of feedback mechanisms that you create

    idle default mode-> alert mode-> attack mode-> return to default mode or continue attack mode-> defeat modes must be catered for also

    building ai is probably the most advanced work you will ever do for a game...but try to break it down into understandably sub routines or feedback loops to make sense of it

    Using the above example

    you may restrict only enemy instances that are within a certain "distance" to the player by adding a subroutine that does something like

    CONDITIONS-->

    FOR EACH (enemy)

    SYSTEM--> compare two variables--> player.x, player.y, enemy.x,enemy.y is less than 100 pixels

    ACTION--> Enemy(Find PATH to Player.x,player.y)

          

    understanding the basics of flow charts and actions will help you write better AI routines...

    but they are no different than any other programming when you get down to it

    try to think of it like a PARTICLE system

    you set the basic characteristics up but each entity has random or specific feedback affected rules that determine its behaviour

    you must as a programmer allow for each possible feedback behaviour other wise your AI will get stuck in loops and be unable to change its own behaviour..

    if you posted your AI routines I could go over it for you if you like..

  • *spanks monkey to NNG's Avatar*

    aaaahhhhhhhhhh

  • "Drooling"......literally......the dictionary definition of eagerly anticipated

  • Cant you use the built in Timer Behaviour?

    Its purpose built for Multiple Timed operations...

    Just add it to any Sprite in the game or object such as a Text object or Sprite font...that way you can have an onscreen timer by using the Set Text function

  • I think your missing the question part of your question...

  • Yes ..Jobel... Burvey is right..nesting as mentioned is the proper procedure

  • Usually in Games you would have a options menu that allows you to Adjust these before gameplay begins...

    Using pull down lists or something similiar

    I found when using Chrome having a "Fullscreen" Button on your hud or gui works better than a keypress...Chrome uses 'F11' normally to change to fullscreen mode..You could over ride this I'm pretty sure

    There is a thread about overiding browser default keyboard shortcuts somewhere..which may assist you also

    If you look closely when you set up your events

    you can make any type of Fullscreen mode occur as long as it connected to an event....

    I've tested it ..it works every time..especially if you use a simple system of pull down listsboxes or radio buttons to switch modes..

    I cant see any reason why key presses wouldnt work

    but the same issue happens for me occasionally which is why I prefer to use a menu based options ..which has the advantage of being able to set fullscreen mode before gameplay begins

    I think the Manual entry on this says that Some browsers "may or might" require a onscreen button to enable that request Full Screen in Browser event.

    It is closely tied to the Window Size functions and the to a lesser degree the layout size...

    changing layout size isnt a great idea during run time..but you can dynamically alter the window size ...

    Perhaps checking to see if the full screen window size matches or correlates to the Aspect ratio of the device that you are trying to change to fullscreen might help..

    I've had no troubles with the Node web kit export ...

    Could you post a Capx or show an example demo..

    and include which browsers you intend to use...

    Hope that helps

    <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Hi Helena, Its a good question

    But I don't think just adding a random amount every few seconds is what you really need, I could be wrong..but doing that, it would make the Balls flight path unpredictable in a steadily incremental but consistently erratic manner..

    Which might be good for funny effects but doesn't simulate accuracy..

    I'm also pretty certain that the specific function you require isn't part of The Bullet behaviour Maybe you could suggest its Addition in the Forums...t would be a nice feature

    There is a manual work around though that might help and would give you highly 'precise' control over the flight path of the Rebounding Bullet...

    Firstly,

    To your "Ball" object add an Instance Variable called "Number of Rebounds" or similar & make it a "Number" Type Variable Initial Value 0

    Then make a new Event that reads

    Ball--> on Collision...Add 1 to Instance Variable "Number of Rebounds" or whatever you named it

    Then a new Event or sub event that reads...

    Ball-->Compare Instance Variable("Number of Rebounds") is Equal to (4 or 5)

    Actions--> Reset Instance Variable("Number of Rebounds")

        --> set Ball.Angle to (Ball.Angle) + 1 (more or less if you like)

        --> Bounce off Object(wall)

         

    That should be a workable solution for Precise control.

    Or the only other idea I can think of is to add a tiny angle of deflection to every rebound ......even a single degree would do it

    Assuming you are using the Bullet Behaviour,

    There is a "Bounce off" action in the list of events after collision

    I presume this is there to enable custom actions in addition to the standard Bullet Behavior

    The Events you would need would be something like

    -->Ball--->On collision with(walls?)

              --> Bounce off Object(wall)

              --> set Ball.Angle to (Ball.Angle) + 1

    This would make the ball slightly adjust its flight path ..

    barely noticeable most of the time but would theoretically prevent it from staying in a locked pattern

    You would need to make certain that The Bullet Behaviour "Set Angle" Property in the Property Inspector Tab is Set to "Yes"

    Otherwise the Bullets Flight path will not match its Sprite Angle

    Timed events may add unnecessary erratic additions to the flight path

    of the ball...

    But the best way is to test all the methods and see what works best for your game

    The most accurate way is to use the On collision Condition events

    Another Idea would be to add a tiny amount of Gravity to the Ball object in the Property Inspector Tab...This would always exert a slight natural downwards or upwards force on the Ball..

    The Bullet Behaviour has built in Gravity Physics

    Hope that helps

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Oh no......I was posting from my android...looks like it deleted the entire message...

    You are talking about what is known as "Decals" small sprites spawned at specific locations to indicate registered visual markers such as Bullet holes, blood splats or any other kind of mark

    I looked at the Demo you posted...

    from what I could see....

    it appears that you havent properly set the angle of the bullet Decal

    The correct sequence of events should be....

    -->On Bullet Collide with Rectangle--> Bullet Spawn another object("Decalsprite")

    ->Set "Decalsprite" Angle to Rectangle Angle

    ->Pin "Decalsprite" To Rectangle position and Angle

    Try that..

    It appears that you havent set out the Sequence of events properly

    you can tell by looking at the Sprite when its Spawned..it always appears in the verticle position no matter what angle the rectangle is and never updates its angle once attached

    Try that

    Otherwise

    A more complex method is to Calculate whats known as a "Normal"

    basically The Objects Vertical Angle from what ever Origin is..Usually 270 degrees from its 0 initial state should be Vertical..

    TO calculate the more complex method you would figure out the difference Between the Resting state"Normal" and the current Angle and apply that new Angle in Relation to the Layout ..but yeah the first method should do it...

    Hope that helps..

    sorry for the missing text

  • hope that helps