GeorgeZaharia's Recent Forum Activity

  • see if offset works for you

    OffsetXY example

    by implementing the above offsetXY you also remove lots of events that you duplicated as subevents to check all those leftrighttopbottom etc

    drag the green box around , at around 25pixels overlap left top bottom right it will turn red, if is not overlaping at offset returns to green ... i think this is what you wanted ... all you need is adapt it to your movement behavior.

    rule of offsetDirection: OffsetX +25 is Right, OffsetX -25 is Left, OffsetY +25 is bottom and OffsetY -25 is Top.

    the offset works from the greenbox bboxtop,bottom,left,right ... based on the origin point of the image i think didn't messed with that origin point.

  • objectY on collision with objectX > action = objectY.bulletbehavior = disable.

    see if that helps.

    if your bullet, has bullet behavior on it... all you have to do is add Solid Behavior on the wall, bullets might ricoche tho.

  • not sure if this will work, but you can also try the For Objecting Sorting Ascending by UID or something.

    and do something like:

    For "bullet"
    Compare value : bullet.bulletbehavior.moving = 1 
    sorting ascending
     action > cancel some action ( since is not 0).
    

    the idea is you loop trough all bullets, and if the moment happens in 1 of them, then u cancel whatever you need to be cancel or increase timer waiting or what not... if the loop returns 0 your cancel action won't happen.

    needs testing ....

  • I have lost of things in layout and somewhere I want to restart my layout but I don't know how this restart layout action work. It restarting layout in its current situation, There were some objects out of layout and during gameplay they are inside layout and lots of things. After restarting layout everything is still there current position. How can I actually restart layout where all objects reset to their starting position.

    When you restart layout, if used alone, what happens all non-global sprites, reset in that layout as you designed them in the visual editor.

    However, if your objects have positions saved in dictionary, or by global variables, you have to reset those also.

    Like this:

    Reset global variables,
    Dicitonary clear xYz
    Array empty
    wait 0 
    Restart layout.
    

    hope it makes sense, and maybe helps?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • like dop2000 said you have to check if previous action completed, the more complicated yet perfect way of doing it is by using functions, not sure if this is still a thing in C3 or it got replaced by the javascript...

    but the idea is if function plugin is still a thing you can do something like bellow pseudo-code

    Solution 1:

    1. on F pressed, 
     1.1 Sub event if function "spawn action F completed" > action call function "spawn action F"
    
    2. On function "spawn action F" > do this actions 0-n++
    

    having a timer from my experience, it delays things and then glitches happen, with a delay... but it depends on how you implement it, the solution 3 shouldn't create any delayed glitches.

    Solution 2:

    have 1 boolean or global variable that u turn on and off while actions happen, and you have something like bellow:

    Global Variable "checkF" = 0;
    
    1. On "F" Key pressed 
     1.1 if checkF = 0 > action > set CheckF = 1
    	 do something
    			 do something
    			 set checkF = 0
    
    

    this will not let you tap super fast and overlap things but will create like a 0.1-0.2 delay in your spawning action when you press "F" it will still overlap but not as fast.

    Solution 3:

    The timer

    Global Variable "timer" = 0;
    
    
    1. everytick (or if timer) > 0 >subtract from timer 1 (this happens everytick or dt, so is closed as being miliseconds and not seconds, to increase delay either increase 2.1 set timer to 1000 or set the value of subtraction to 0.2 or 0.1)
    
    2. On "F" pressed 
     2.1 if timer =< 0 - action
    		 action 
    		 action 
    		 set timer to 100 (in miliseconds if you subtract 1 everytick like we do above)
    
    3. if timer < 0 - set timer to 0 [this is fail safe so the timer never goes under 0]
    
    
  • GeorgeZaharia OP was not asking how to move objects on a grid. The question was about chess.js API - the correct syntax used to promote a pawn.

    if he doesn't know how to move a object on a grid, wouldn't probably know how to implement chess.js API.

    ... also i sort of missed the first 2 pages, was thinking this 3rd page is the 1st page ... lol my bad.. now i seen he knows how to work an array.

    and since C3 now supports JS scripting

    here is a full js tutorial on how to make a chess based on js

    maybe it helps?

    tutorial how to chess js

  • You are welcome

    P.S there is google and youtube really... you wasted 1 hr waiting for a reply, instead of takin 5 seconds to search google.

  • what i could find on youtube, looks like Faux 3d, or isometric game type 2.5D you can do it in C3, but requires some trigonometry knowledge for spinning the ground and stuff. i think was a tutorial on C2 that had a 2.5D world test thing, buggy as hell, but yea you could fake that 3d effect. since is not full 3d. but you will need lots of animations and lots of medium/advanced mathematics.

    however easier would be to just make the game in 3D directly using unity or something similar and just tilt the camera... towards that angle... less headaches.

    another way of doing it, is doing it top-view, instead of tilted, as long as you have the story and the gameplay is good, doesn't really matter what camera angle is at.

  • Download example

    in this example you have... 2 rows, 10 coins, 8 coins on the first row 2 coins on the 2nd row...

    they are evenly spaced out, you can control the values etc...

    you can also place a random position on screen using loopindex.. however if objects overlap, you have to add a "condition" to move the top object a bit to left or right until is not overlapping.

  • this is how i learned Construct ... 1st the thing sort of came to be visually easy, as im a front-end developer so knowing html5, css stuff helped.

    2nd i took all the examples in Construct over the years and disect them took apart line by line see what they did etc...

    3rd i played a lot with one example in particular that made me more used to construct (for me was the audio plugin example), i played with it a lot of time... understood a lot of stuff from it and made me more confortable with the interface. started mixing game ideas with the music stroboscope etc... making objects dance on music, fluctuate etc etc.. so in all what people suggested above... is learn by doing and redoing. having a bit of programming knowledge helps you get into that logical thinking part of things in the event sheet, but even without that you can still learn Construct "programming" by doing.

  • try using .ogg files instead ;)

    or if you can... host the audio files on a private website/server... and once the game starts load the assets from there... careful the file link on server must be like this depending on construct plugin you using: www.randomwebsite.tld/filesource/music.mp3 if the file format is not present in the link audio won't import.

    while this won't make your game smaller... since you will download eventually the full size... what this will do... is have your initial game small. so people can download it, and install the launcher fast. then they will wait in the loading screen of your game while the assets are downloaded, as in any major/normal game you will do. but this method helps you if you want your game to be like just the code no assets to be placed on facebook instant games for example where the requirements maximum files size of game is like 800kb... but that isn't for the whole game, that is for the "snapinest" of initial load only.

    if you can't figure the ogg or the server hosting part out, use audacity, and convert your mp3 from 43000Mhz to 16000Mhz mono/stereo single channel, you will lose some quality... like in any compression, but not that big difference for real... unless your device is like full stereo home cinema blueray etc etc etc where sound is a professional thing.

  • Download C2 Example

    image preview

    dop2000 was right :)

    took longer to place the objects in screen by event sheet than to actually make the calculation work ;)

    have fun... initially who ever said something about placing the loop under the start of layout was right... is just you need to get the order of events properly.

    hope this is what you mean.

    .. if you want to use it for coins in screen in a game... just replace the "on start of layout" to some 1 time trigger. you don't need at that point the creation lines... just the counting "for each coing iid ascending" and do the action. just make sure u trigger it once like... on collision with object, or on destroyed, or on score end game custom boolean trigger 1 time.

GeorgeZaharia's avatar

GeorgeZaharia

Member since 30 Jun, 2014

Twitter
GeorgeZaharia has 36 followers

Trophy Case

  • 10-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x9
    Popular Game One of your games has over 1,000 players
  • x21
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Great Comment One of your comments gets 3 upvotes
  • Email Verified

Progress

21/44
How to earn trophies

Blogs

  • Construct For Dummies - Simple Tutorial Collection

    I scour the Construct forums for users tutorial requests, and create small quick and simple tutorials using Construct's defaults features so anyone can use and apply them.

  • My Dev Logs

    Thinking on games 24/7 is fun and waste of time and unproductive if we don't bring those game ideas to life. In this blog im bringing my game ideas to life and log their development process.