ThomasOlsson's Recent Forum Activity

  • Hey buddies

    I used to do that but I don't remember how and I'm trying for a while now, so how

    can I pick only one target instance even if a hitbox collides with several targets at the same time?

    The problems is that since the box spawns directly on the targets, the event involves several

    targets at the same time, and at the exact same moment.

    I tried to use "Pick nearest from hitbox", but it doesn't seem to work in that situation. Would

    be really nice if somebody had an explanation to get me out of here.

    Thanks

  • RogueLike SoundPack — Now for sale in the Scirra Store!

    https://www.scirra.com/store/royalty-free-sound-effects/roguelike-soundpack-2129

    <p>*Music in preview not included*</p><h3>So you want to craft a Roguelike?</h3><div class="deshr"></div><p>This pack contains 260 sounds and offers a complete sound-bank to illustrate your Rogue-like or any fantastic medieval themed game, accessed on dungeon and middle age weaponry fights.</p><p>I focused my work on detailed combat, character movements, dungeon exploration and looting sounds, always working in the name of player's feedback.</p><p>This pack includes</p>

    • 5 quite creepy ambient sounds and 3 local ambient sounds such as fire and magic source.
    • 19 environmental sounds such as Doors, traps, shrines, and moving walls to illustrate interactions.
    • 18 footstep sounds on various floor types, including armor sounds to add on the regular sound if the character is armored.
    • 42 impacts to illustrate various hits, sorted by materials such as MetalOnFlesh, ArrowMetal, WoodOnFlesh or SwordOnSword.
    • 13 interface sounds with 4 orchestral style jingles and different styles of cursors.
    • 20 item sounds to illustrate looting or manipulation in inventory, and a few classics like torch, potion or map when the players uses it.
    • 29 magic sounds with fire, ice, bolt and healing.
    • 62 monster sounds to illustrate 6 different monsters like slimes, zombies, and goblins.
    • 18 movement illustration sounds like jumps, dashes and corpse falling, with and without armor weared.
    • 31 weapon sounds (Sword, dagger, big sword, bow, axe and staff) with the equipment sounds and swings.

    <p>The Roguelike soundpack fits perfectly for quite small sized games, and I plan to add free content updates.</p>

    Use this topic to leave comments, ask questions and talk about RogueLike SoundPack

  • Ow, and also, if your player, your enemy and your square all had the physics behavior only you could simply set player>disable collision with square! But I guess.... it's not as simple as that, right ?

    I hope I can help

  • Hi Sebastian!

    You have many ways to this I guess. Here is what I would do with my little knowledge ^_^ :

    -You could set the Square's solid disabled as soon as the player is overlapping it, and enable it back if the player is not, but it would also allow the enemies to pass as long as the player is passing on it, so it might be stupid.

    -You could "bump" out enemies on collision with the square if it is not solid by using the "Set Vector" platform action or even more dirty by reseting there position to self.X-20 if they are on the left (20 is an example here) and self.X+20 if they are on the right side of the object.

    If you send me your CAPX project I can try to build something and send it back.

    Vega

  • Sorry I didn't understand the thing well. Could you upload a Capx then I can figure out by myself what you want to do ?

    Vega

  • I don't know how you exactly want to use this system here but I actually found that the spreading of the rooms is kind of beautiful ahah. Also, if you really want to hide it why don't you do something like hiding the screen as long as the rooms keep moving, and "unhide" it as soon as everything stopped ?

  • You're welcome, nice to help

  • Hey man, I managed to do the "tedious" way, with a group and local variables. It works really well even if it was kind of a mess at first. Also I used the "pick nearest instance" to determine who the IA fighter focuses.

    Thanks, your last sentences gave me that idea.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi mestrejedi3221.

    First I would include the platform behavior to enemies (or 8 directions if it is no platformer), it will be much easier to control their movements this way (don't forget to put "Default controls" off).

    Also use an instance variable in enemies to memorize the player even if he left the LOS, being able to run after him then. Let's call it "Memory" (initial value = 0)

    About shooting I would do something like :

    ("-" represents sub event)

    if Enemy has LOS to player : Set memory = 1

    • Enemy compare X : if greater than Player. X : Set mirrored
    • Enemy compare X : if lessthan Player. X : Set not mirrored
    • Every 3 seconds : Spawn bullet

    About moving to the hero :

    if Enemy has NOT LOS to player :

    and Enemy memory = 1

    -Enemy compare X : if greater than Player. X : Simulate control Left

    • Enemy compare X : if less than Player. X : Simulate control Right

    Does it help ?

    Vega

  • 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

  • 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.

ThomasOlsson's avatar

ThomasOlsson

Member since 10 Jul, 2014

None one is following ThomasOlsson yet!

Trophy Case

  • 12-Year Club
  • RTFM Read the fabulous manual
  • Email Verified

Progress

14/44
How to earn trophies