GeorgeZaharia's Forum Posts

  • Physics behavior don't take in account the graphic appearance of your objects.

    However it does take in account and measures the heavy part of you bounding box, so if you have your collision box done properly they should act normally, what you have i think now is a rectangle bounding-box probably which makes the objects act like square even weight type.

    To adjust your collision boxes on sprites go to animation, and on left side you should have a collision box editing feature.

    On physics behavior you need to also adjust which collision box shape should the physics behavior use, and you have 3 choices, 1st would be Collision Polygon - which is defined by your animation editing - this is what you want for best results.

    2nd choice is bounding box which makes all physics objects of that type ('hammers'), to act as a even weight square thing.

    3rd choice is circle, usually used for circular objects ie. 8-balls.

    Another very important thing that needs to be adjusted on your objects, after you made a custom collision polygon is the objects origin point. If you put the origin point on the hammer head, then that will be taken as the center of mass for the object. The origin point is always going to be 0 as id recognition in the Construct system, no matter what other points you add or even if you rename it. So if you have the origin point put at the end of the handle center of mass shifts there causing ur hammer to fly backwards, you might want to put image point 0 to the hammer head, and if you used it as the position to pin it to player hand u can create image point 1 and pin that to the player hand.

    Hope it made sense! i rambled to much i think... in short play with ur Image points.

  • Nice glad you solved it in the end.

    For the sounds and cpu usage, usually the pre-loading happens when u load the app, try pressing f4 on preview so it starts with the loading bar and logo.

    If you see the game without a loading bar either the pre-loading already finished, or the files are skipped. But that doesn't usually happens. So it might be your other event sheets and loops, that spikes ur cpu, you might have a loop updating an audio, or a text on a everytick type of condition. There's various reasons when comes to a complex layered Construct projects.

    As for desktop vs browser Construct i think they are the same thing.

  • After I changed the order as you suggested, it's playing only once but... any other crates I destroy after the first one won't make sound, so it's REALLY triggering once, and that's it.

    Oh my! I have so much to learn... sorry for the confusion, I'm trying to learn as I go.

    You can also add on the event that triggers the audio to play a For Each crate loop from the system expressions.

    And i think at that point you could remove the trigger once. since that would fire on each object type crate is being hit. Right now you are giving it a general state, and applies to all and considers all objects 1 object if your using trigger once, is a bit confusing.

    Il do a example file for you in a few minutes.

    Edited: take a look at the events in destructible objects audio. now the destruction part or Event nr 3 you can put it on the general eventsheet that you include where you had the destroy by fade to apply to all crates.

    Hope it fixes your issues.

  • What else can I try?

    You should move the fade restart | destroy event for the crate immediately under the audio play so its not delayed. Preferable in the same event sheet, or move the crate audio play above the fade restart on the same event sheet, they should work.

  • here is a simple wall grab using the C3 platform behavior only

    In order to tweak it to grab instead of slide, just set max fall speed to 0 when has wall left or right.

  • For images to show in post use [ img = url ] without spaces

    You also need to destroy the crate after triggering the action for audio. on the condition of hp<0. That will stop the double audio playing.

    On event 96 on actions under audio choose add crate = destroy

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So the first issue I'm having is when my Player Hits more than 1 crate at the same time:

    The volume is Xdb + Xdb for each Crate, it sounds too loud for sure.

    But when hitting just one crate it sounds perfect.

    How can I make it so it will only play 1 "Crate_Hit" SFX a time, instead of all damaged crates at once?

    Thanks ahead!

    What you need to do there when you play the hit crate audio is check if the audio is playing or not

    And youd have some code like the following

  • I'm new on construct 3 and I am curious if there is any way to make a game on construct 3 that is rhythmic side-scrolling and action just like harmoknight on 3ds.?

    Theres a few options, one pick your level songs, play the music file based on players speed, and also you would need to make a custom hand-made type of orchestrated scenary its a tedious thing but might work.

    Second option i can think of is Audio analyser and creating enemy objects based on the audio beat rhythm.

    And the third option, would be a plugin that reads accurately midi files and plays the notes whenever you hit a surtain object, i know there are a few plugins for C2 but not sure if their in the works for C3.

    C2 midi plugins : plugin midi by blackhornet

    | jsmidiparser plugin by rexrainbow

    And are probably more but those are the once i remember have potential to be used as you want.

  • for 1 use play audio at object position to get that pan movement of sound

    for 2 about the effects check this tutorial

    additionally on 1 you might want to code the volume if player is at a surtain distance from a object to lower the source of the specific audio by comparing the distance between the player x y and object audio source x y.

  • instead of pick all instances id use for each coin and then compare two variables distance(coin.x,coin.y,character.x,character.y)<500 Set coin magnet true

    that should do the trick.

    also are you sure that coin on top is a normal coin? and not a UI coin? make sure all coins have the Boolean Magnet on them.

    it might bee also because your movement condition is triggering for each coin but then u block it on trigger once.

    here is an example coin-magnet with the code above in it. and i removed all the behavior dependencies you have in the code there is simpler on my capx less complicated.

    I updated the file added the powerup magnet on player pick also so its easier to understand how to apply to your case! :) if you have problems with your post "waiting for moderator" just edit it and re-post it again.

  • Take a look at the turret behavior beginner example in C3 and predictive aim example, they are using turret and all you have to do on turret is set the parameter property that says first in range to nearest.

  • OH yea C3 has that feature... Was thinking he needs it in C2, since its in C2 how do i section ... then my reply would make sense.

    Forgot about C3 :D above one fixes ur issue if your using C3.

  • But this is obviously not scalable. Imagine that code with 50+ enemies. So I'd like something like this:

    > var x = 2

    > spawn(enemy with id x)

    >

    Is there anyway to do this on construct?

    Currently no, since the create or spawn action in construct is forcing you to visually pick an object.

    However if you really have multiple objects and the familly is just for the purpose of giving it 1 variable type of thing you can try instead of multiple sprites in 1 familly have 1 sprite in the familly, and multiple animations on that sprite named anim1,anim2,anim3, etc... and then when X = 3 spawn sprite at x y and set sprite animation to anim&X

    thats the only way i can think of that this might work.

    There is also this 2 year old post that kinda talks about the same problem, they seem to been solved it.

  • Logically it should act exactly like you specified, however not sure if thats how they are working. So i checked this two manual entries and they seem to say something along those lines that you are thinking of...

    Global instances

    Persist behavior

  • fur just mirroring the animation left and right based on current position of the character you can try this C2 file, the last 3 condition events are for mirroring the animation, there are no plugins needed. however you might need the plugin to move ur character automatically unless u want to code it manually also.

    And you can achieve that by giving the character u want to move in a loop a variable called moveto and set it to 1 or 2

    and that would continuously move ur wanted character left and right, combined with the animation events from the capx above it should look pretty smooth without any plugins, but then you would use some extra events that you previously saved with the plugins/behaviors.