lionz's Forum Posts

  • Set default controls to No to limit all the movements. Then create an event on jump button pressed, platform simulate control jump.

  • For health bars you can put it in a container with the enemy. It gets rid of the create health bar logic, instead it will be automatically created although you will still need to set position, and when you destroy the enemy on hp 0, health bar will go with it automatically as well.

  • Good luck with the game development :)

  • Move the 'does not have line of sight' event out of the sub event of the 'has line of sight' event, it should be its own event. Line of sight and no line of sight cannot be true at the same time.

  • The actions you are running for on text changed event, add them to the set text event.

  • You do not have permission to view this post

  • Assuming playerprojectiles is the bullet hitting the enemy, the event should be Playerprojectiles on collision with enemy, so you can pick the projectile, then destroy it. That should also fix the hp problems as projectile on collision with enemy will pick that enemy and subtract damage.

    Although family logic can be used to reduce some code such as 'create healthbar for red' 'create healthbar for white' etc, you can still split out some code to define things for different types. To do this, create a family instance variable 'type' and then you can assign all stats to red type and all stats to white type on created. So if type=white it will have the appropriate health.

  • Nice game. I bought it, and Pinkman, to give you some support there.

  • Well one issue I can see is that you haven't made use of the family. The whole point of putting enemies in a family is that you don't have to duplicate code, which you have done. Your code should apply to all enemies so there is definitely some redundant code in there. The health bars at least should be in code like on Enemies created, spawn healthbar. Enemies set healthbar to enemies.hp.

    Anyway the actual bug, it's because your set position for the health bar is in its own event and it does the last one on the event sheet, so every tick it is setting the health bar to the position of enemy 2. The set position events for the health bar do not relate to anything and are independent events. The one above for enemy 1 is ignored, you won't see anything happen for that, and if you look in debug mode you will probably see several health bars in that enemy 2 location overlapping each other.

    As for resolving the issue, if you reduce the code as stated above to on Enemies created, spawn healthbar. You can then pin it to the Enemies position at that point and not every tick.

  • > I'm not sure what this is and I'm not installing it to find out...

    There's no install page lol

    It's a screen shot

    OP's question is what do you think of Clickteam fusions event editor? What I'm saying is I'm not familiar with Clickteam fusion, OP is assuming people know what it is and can deduce from the screenshot, I have no idea. If the post was something like what do you think of putting this event editor into Construct 2 with an explanation of its function then it becomes a discussion about Construct 2 i suppose, but there isn't enough information to go off in the original post for me to answer the question.

  • I'm not sure what this is and I'm not installing it to find out...

  • Please post a link to the capx, or some screenshots of the events.

  • "I use the AJAX command to fetch the JSON project file and then load it into the Array."

    What are the events you used to do that?

    It should be AJAX request json with a tag, then on tag completed set value in the array to ajax.lastdata

    The fact that it is still a bunch of 0s means nothing was successfully added to the array.

  • If you pass the variables through the function as normally expected then there will be no spelling error as they are variable names. Send through player gold and the price of the item as params and compare them inside the function.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I can't think of a reason for comparing a function call like that..