ThomasOlsson's Forum Posts

  • Hi DurandalCorp

    First of all be careful your link is tricky because there are spaces in it, here is the right one :

    https://dl.dropboxusercontent.com/u/103 ... index.html

    It is a very interesting matter here. Did you try to use the "Set time scale" system action ?

    Vega

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi guys ,

    I'm working on a fighting game and there is something I can't do here. Lets start by explaining you what I would like to do.

    So there are two fighters in my layout. The important thing is that they are the same object, there is only one type of character here. Fighters have several instance variables, including "Control" to define who controls them (0=Player 1, -1=Computer AI) and "Team" to define who they can attack or not, as I plan to put teamfights.

    I divided my code in two main parts, the first is the actions of a Fighter (run, punch, jump, etc...) and the second one is what calls those actions : keyboard inputs if it is a player, and AI guidance if it is a computer playing.

    I am stuck in this AI thing and it might be because I'm confused with picking. Lets simply start with trying to make a fighter run against another. It looks like this :

    if Fighter | Control = -1 (#If the fighter is played by computer)

    -Compare X : if Fighter X greater

    than Fighter X : Simulate control "Left"

    -Compare X : if Fighter X less

    than Fighter X : Simulate control "Right"

    I need the AI to choose a fighter that is in a different Team and is the nearest target available. Since all the Fighters are the same object, it goes much more complicated and I'm lost here. Any ideas of how to proceed ?

    I hope my explanation is clear enough. I been watching tons of videos and stuff but I can't make it clear.

    Thank you guys

    Vega

  • I found something pretty ok with booleans and using animation's end as conditions like you suggested it.

    Thank you very much guys !

    So cool to get helped.

  • I'll give it a try guyz, thank you so much.

  • Is that it ?

    I'm sorry man, still the same... It's confusing.

    I think it might be because of my dirty way to set "EnemyHurted" to false. As you can see, after

    being hit there is a delay of 1 sec and I set it to false again. It might be because of that isn't it ?

  • Hey Lennaert,

    It looks a bit better but still it is not clear. The enemy is able to attack me even if I

    keep punching him, like the attack event is finding a short delay to do it.

    Here is a screenshot of the event sheet piece :

    http://img11.hostingpics.net/thumbs/mini_480833Screen.png[/img][/img]

  • Thank you for the quick answer !

    Looks like a good way that I should try. I will, and then repost feedback.

  • Hi guys,

    First of all I hope this is not a typically posted issue. I could not find what I am looking for.

    So here is my trouble : I'm trying to do a Beat Em Up style game with hand fights.

    My problem is that the enemy is doing several actions at the same time. For example he can

    attack even if he is supposed to play the "hurted" animation.

    I tried to solve it by using local variables like "If action = 0 Enemy can attack, and when action = 1

    he cannot because he is playing the hurted animation." and all with little timers but still it is doing

    everything at the same time and it looks gross.

    I think I must have missed something but I'm just running out of ideas... any suggestions ?

    Sorry if it is not very clear.

    Thanks

  • Hi Abdalghani,

    Did you try to use the "Custom Movement" behavior ?

    You can use it to make go left or right when a key is pressed.

  • Hi theDeletr,

    I don't really know how others would build it up, but I'll try to explain how I usually do.

    Do you want to put ammo limit too ? I will consider that you don't for this simple explanation.

    So you need a variable for this. For example lets use a number variable called "ammo" wich is

    supposed to be the number of bullets in your gun, and that your gun is a classic

    pistol with 15 bullets in a loader. For example :

    IF player press SPACE

    IF "ammo" is greater than 0 Spawn Bullet

    Play sound "GunFire.ogg"

    Add to "ammo" -1

    Else

    IF "ammo" is equal to 0 Hero animation "Reloading"

    Play sound "GunReload.ogg"

    Wait 0.5 seconds

    Set "ammo" to 15.

    This makes your player reload if he press Space and that the loader is empty. The 0.5 wait command is

    the time needed to reload your gun.

    Please tell me if you don't understand what I mean, I think others might have a better way to do it.

  • I'm having this kind of trouble too, I really can't figure out how to solve it... So please guys help us !

  • Talion's Law (Action Beat) — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-music/talions-law-action-beat-524

    <p>Talion's Law is a dark song matching with serious fights and revenge.</p><p>Wave track, 127 BPM, 1'45.</p><p>Contact me for track by track export and for loop version.</p><p>Enjoy !</p>

    Use this topic to leave comments, ask questions and talk about Talion's Law (Action Beat)

  • beni92 : Thank you, I did it, and it is quitte better even if I still have trouble.

    : That's actually what I do !

  • Hi guys,

    I'm currently working on a platformer and I'm having trouble : to map, I don't use tilemap system but

    I prefer to build it with independent objects.

    Now I have this issue : sometimes my hero is stopped while running just because of a few Y pixel difference with the next solid floor object. Of course the player can jump over it. But for obvious reasons I don't wan't this to happen and would prefer something more fluid.

    Can you somebody help me ?

    Thanks !

  • Hi guys,

    I'm French and currently living in Kyoto, Japan, and I'm looking for Construct or any

    other soft game design people to share, create together and stuff.

    Just posting in case, thank you !