bullet damage in the Multiplayer example

0 favourites
  • 6 posts
From the Asset Store
Unlock platyers earning coins, and save it with Localstorage
  • I'm using a edited version of the Multiplayer example, so instead of the laser beam The players now fire bullets.

    I put all bullets in a family (There are only two bullet types so far in my program) and I gave the Family a instance variable called "Damage", this is what my code looks like...

    For each (Peer)

    On collision with (Bullets Family) Actions- Peer [ add Bullets.Damage to Health]

    Actions- Bullet Family [Destroy]

    I have a bullet that supposed to do -10 damage but in only does -1, please Help!

  • I'm using a edited version of the Multiplayer example, so instead of the laser beam The players now fire bullets.

    I put all bullets in a family (There are only two bullet types so far in my program) and I gave the Family a instance variable called "Damage", this is what my code looks like...

    For each (Peer)

    On collision with (Bullets Family) Actions- Peer [ add Bullets.Damage to Health]

    Actions- Bullet Family [Destroy]

    I have a bullet that supposed to do -10 damage but in only does -1, please Help!

    Hmm.... do you have the damage variable set as a Boolean? if so then it might go like this...

    For each (Peer)

    On collision with (Bullets Family) Actions- Peer [ subtract from Damage 10]

    Actions- Bullet Family [Destroy]

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > I'm using a edited version of the Multiplayer example, so instead of the laser beam The players now fire bullets.

    > I put all bullets in a family (There are only two bullet types so far in my program) and I gave the Family a instance variable called "Damage", this is what my code looks like...

    >

    > For each (Peer)

    > On collision with (Bullets Family) Actions- Peer [ add Bullets.Damage to Health]

    > Actions- Bullet Family [Destroy]

    >

    > I have a bullet that supposed to do -10 damage but in only does -1, please Help!

    >

    Hmm.... do you have the damage variable set as a Boolean? if so then it might go like this...

    For each (Peer)

    On collision with (Bullets Family) Actions- Peer [ subtract from Damage 10]

    Actions- Bullet Family [Destroy]

    no the damage variable is just number not a boolean.

  • Is anyone gonna help me?

  • Can you post a .capx of what you are working on? It may help us help you.

  • how do I post code?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)