Zetar's Forum Posts

  • While sin is active have an event checking every tick which direction sprite is moving, and flip sprite.

  • I had made a "fsm" behavior before. Basically it is for agents simulation.

    However I have no idea how to present it. This demo is a good idea to use fsm. I will release latter.

    Sorry, what is FSM?

  • GenkiGenga : ah yes, I didn't though about the case where you can have food on the blue bar :p.

    I made that as a base for a simulation I want to develop, where the little "agents" can reproduce themselves, evolve genetically, etc... A bit like the game "Creatures" with the Norns, if you remember.

    I made something like this in Construct, back a year ago. I was called Flabbly. Little Male and Female petri dish creatures that laid eggs and hatched babies. It was fun to watch. I erased the file on accident though. I still have the EXE somewhere though :) I made it so you could drag a species or two into an examination area and study it. I should re-create it in C2...

  • However now that I read your post again, the Self part is actually another AI ship, right?

    So In that cars you would add a Event above all others,

    For Each ShipSprite

    ShipSprite Pick nearest to Self.x, Self.y

       ShipSprite Team Variable(NOT EQUAL)to Self.Team

       System Compare Distance (Self.x,Self.y,ShipSprite.x, ShipSprite.y)<300

         ->Set variable Self.AttackUID = ShipSprite.UID

  • Are you willing to share your CAPX, or at least a simplified one?

    So If I understand,

    You are doing something like:

    ShipSprite Pick nearest to Self.x, Self.y

    SubEvent-> ShipSprite Team Variable(NOT EQUAL)to Self.Team

              ->System Compare Distance (Self.x,Self.y,ShipSprite.x, ShipSprite.y)<300

                   ->Set variable Self.AttackUID = ShipSprite.UID

    Something like that?

  • I know you got yours working, but in order to keep from using another sprite detector, you could do:

    For Each Sprite(or family enemy ect...)

    ->Distance(you.x, you.y, Sprite.x, Sprite.Y)<100

    -->Spawn whatever. Do whatever.

    ->Distance(you.x, you.y, Sprite.x, Sprite.Y)>=100

    -->Destroy whatever. Do whatever Else

    I dont know if it would make anything better or worse...

  • This is a SUPER appreciative Forum :)

  • Woot...   I think....

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I am playing around with a platform game idea. The player sprite will be a combination of physics objects connected with limited revolution joints. He has a base, a spring and a head on top of the spring. I want to get semi-realistic spring action when jumping and landing.

    I tried using the sin function, but it makes the physics go WILD! Cant do that... I know I can always fall back to an animation sprite of the spring, but is there a way to tie the spring type motion into the character using lerp or something? Here is the cap.

    http://www.box.com/s/a896f4472dad9ae1e8b0

    I am about to give up on this idea. If any of you can assist me and either suggest ideas or make this thing act more "playable", I might move on and create the game. (Credit is always given if the game goes anywhere)...

    Rock on Forum Buddies!

  • I seem to be getting ODDLES of Devotee badges all of a sudden? Is there a glitch, or is it catching up?

  • rojohound, I see what you mean. When I run the Lemmings example from the other thread and speed up the lemmings, They skip...

    I think I got some ideas from your example! Thanks!

  • As far as the mouse is concerned:

    Create a button and place it.

    Create a Text Object - Put over Button

    Event:

    On Mouse Click

    ->If Mouse Over <font color=blue>BUTTON</font>

    -->Do whatever

    It automatically will see all objects under the mouse, but YOU specify which object to ACTUALLY see in the event. It ignores all else.

    I think it works the same with touch... Is that what you are asking, or am I to tired to understand?

  • rojohound, Very interesting way to do the worm pixel detection. If I understand correctly, you are testing every pixel on the edge of the Worm Sprite to see if it is touching a ground pixel as indicated by the Array. You used an Array so you could have a "detectable" pixel (the x,y coordinate in the array.)?

    I have an Idea to use image points on a sprite (2 bottom 2 mid-sides 2 top) and cycle through them per tick: Something like this:

    Every Tick

    For "Cycle"=1 to 6

    ->System Compare 2 values -> Canvas rgbAt(sprite.ImagePoint(Loopindex("Cycle"))=rgba(Whatever color the ground is)

    Then move back like you did if it touches.

    Would that work? And Would that speed up the FPS? (Haven't tried it yet... Waiting for Day Off... UGH!!!)

  • So, from what I can see, There is no way to change a collision box once the item has been created?

    I am trying to come up with a way to make a simple digging game. I want a player sprite to walk on a block then dig a small hole that becomes a part of the terrain - meaning the player sprite can fall into the hole.   I tried using Destination out on a sprite, but the collision is still an issue (or am I doing it wrong?) Then I studied the Canvas Plugin Posts and saw a reference of using pixel colors as your collision detectors. But I can't make mine work. I have tried many ways. (I can't post my capx at this time BTW...)

    Is there a Tutorial somewhere to help me with this?

  • Another way of doing it is right clicking on the layer in the layer panel and clicking on Add Alpha.