MrBadAtThis's Recent Forum Activity

  • So the bullet still comes out at the 0 degree angle however when i hit the shoot button a second time the bullets direction changes midflight

  • i would like it to be aimed which way the character is facing and its not aimed with a mouse.

    The way my character moves is I have 4 animations Left, down, right, and up

    Depending on which arrow key is held the different animation plays

  • So I have a top down arcade style game and I'm trying to implement a bullet into it however My character doesn't orient to different angles. He just walks up down left or right. so When I spawn a bullet it has no angle to go off of and defaults to 0 degrees.

    How can I tell the bullet to fire from the correct angle when I have a sprite that doesn't orient to angles

  • System expressions

    > zeropad(number, digits)

    > Pad number out to a certain number of digits by adding zeroes in front of the number, then returning the result as a string. For example, zeropad(45, 5) returns the string "00045".

    >

    Perfect thanks for the help

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • So I'm trying to add a score to my game but the way I want it is to have It start at 00000000, but then when points are earned it goes to 00000100. Instead all I can seem to do is turn my score into 100 and it gets rid of all my other 0's

  • If you don't have the spawner in the conditions, any action will apply to all the spawners. I'm guessing you only have on collision with coin in your event. Try adding a system pick nearest condition.

    Perfect once again thank you =D

  • Okay next part is when I walk over the money with my player I want the money to despawn and the spawner to become active again.

    I have it set to destroy money add 100 to score and set moneyspawner.moneyspawned to 0

    But what that does is allows every single money spawner to spawn another money

    Which perplexes me because moneyspawned is an instance variable it should only affect the one he touched

  • Before your current system condition that picks a random Moneyspawner, you need an additional condition that first picks all Moneyspawners that do not have money on them. Use the condition from the Moneyspawner object rather than the system compare two values to check the instance variable. This way, the system pick random Moneyspawner will only pick from the already picked empty Moneyspawners.

    Actually I'm not sure if it will work in the same event, you might need another subevent between the every 2 seconds and pick random events.

    Edit: You dont need another subevent. From the manual - [quote:3fmknbgp]Pick random instance

    Pick a random instance from the currently picked objects. In other words, if Pick random instance follows another condition, it will pick a random instance from the instances meeting the prior condition. Otherwise it picks a random instance from all the instances.

    So order matters here. Make sure you put the Moneyspawners Is Empty condition before the system pick condition.

    Works perfect thanks for the help

  • So I have 8 spawner objects (MoneySpawner) and I want each to spawn a coin ONCE randomly.

    Once the spawner has spawned the coin I want that spawner to become deactivated until the coin is removed

    The way I have it set up now is like this

    However Watching in debug mode It will frequently pick a spawner that has money on it. It will not spawn extra money but it will cause a delay in my spawns. So It can take upwards of 10 seconds to get some of these to spawn

    How can I force it to pick an instance that doesnt have money on it?

  • Don't split up the events. Chances are you are spawning and deleting immediately. Make a sub-event for the count check.

    On click

    -> Monster.Count =0 -> spawn

    -> Else

    -> destroy

    Thank you so much its working correctly now

  • Now second part of my problem I can get things to spawn once and thats great =D But now how do I set it so If something is spawned it will instead destroy that object.

    I just tried spawner clicked and monster.count = 1 then destroy but that doesnt seem to work that stops things from spawning again

  • I don't understand the question.

    OH nevermind i think I made it more complicated in my head. The act of spawning a monster increases the count

MrBadAtThis's avatar

MrBadAtThis

Member since 22 Nov, 2014

None one is following MrBadAtThis yet!

Trophy Case

  • 10-Year Club
  • Email Verified

Progress

11/44
How to earn trophies