0 Favourites

bullet damage in the Multiplayer example

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

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

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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)