User Tag List

Results 1 to 6 of 6

Thread: How to deal with different weapons

  1. #1
    No Products Registered

    Join Date
    Oct 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to deal with different weapons

    How do you think will be better to deal with different kinds of weapons?,each weapon should have damage,number of bullets in clip, rate of fire and all those things...
    Should I make one alt value in each player to see what weapon he is carrying and make calculations for all the features of the weapon in the code?.
    Or should I make a lot of variables in each player saying what kind of weapon he is carrying, what damage that weapon does...etc?.

    I dont know...tell me how you would do it.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to deal with different weapons

    I'd probably do it by having one value to denote the player's weapon, and activate/deactivate different groups to deal with pressing Fire depending on which weapon is currently active.

  3. #3
    No Products Registered

    Join Date
    Oct 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to deal with different weapons

    could you explain more?, remember that there are 4 players, should I make 4 groups for each weapon? (that would be a lot of work), or there is a way to work with qualifiers?.

    Apart from that...you say that, when player picks up a weapon, some group (old weapon) deactivates and the other (new weap) activates?

  4. #4
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to deal with different weapons

    Having multiple players may make the idea a bit more difficult, and I'll have to think about the most efficient way to do it... having copies of each weapon group for each player would work, but could easily become massive.

  5. #5
    No Products Registered

    Join Date
    Oct 2006
    Posts
    22
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to deal with different weapons

    well...no problem, I'll try that way.

    Thanks a lot DavidN, for this and for the other problems you resolved...and for the problems that will come, hehe.

  6. #6
    No Products Registered

    Join Date
    Jun 2006
    Posts
    302
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: How to deal with different weapons

    here is a suggestion:

    take the func loop object for example,

    when a player wants to shoot call a function called "shootGun_"+$str(weaponnumber) , with arg1 = player id,


    on function "shootGun_1"
    + player object id = arg 1
    + player object reload value <0
    + player gun 1 ammo > 0
    -> shoot gun 1 bullet
    -> play gun 1 sound
    -> set gun 1 reload time to player
    -> reduce gun 1 ammo.

    on function "shootGun_2"
    + player object id = arg 1
    + player object reload value <0
    + player gun 2 ammo > 0
    -> shoot gun 2 bullet
    -> play gun 2 sound
    -> set gun 2 reload time to player
    -> reduce gun 2 ammo.

Similar Threads

  1. How does apple deal with age ratings?
    By WhatPixelYouOn in forum iOS Export Module Version 2.0
    Replies: 3
    Last Post: 6th November 2012, 10:34 PM
  2. Whats the deal with decimals.
    By Syp3r in forum Multimedia Fusion 2 - Technical Support
    Replies: 16
    Last Post: 1st September 2006, 02:13 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •