Results 1 to 6 of 6

Thread: Make guys pop up randomly

  1. #1

    Make guys pop up randomly

    Hey, Im making a FPS game and i couldn't make my script work to make the guys pop up at random times.

    I also need help with making a time when u cant shoot, ive tried tons of stuff but it aint work.


    Thanks,
    benndickson

  2. #2
    welcome to the forums! some one asked this a week or two ago, you can view the thread here (download the attachment in post 18).

    I'm not sure what you mean by:
    I also need help with making a time when u cant shoot, ive tried tons of stuff but it aint work.
    can u tell me more?

  3. #3
    hahaha, i thought this was a thread on how to pickup. lol.

  4. #4
    Hey, well i meant i want a time in which u cant shoot ie. bany x6 then u have to wait and reaload b4 u can shoot again

  5. #5
    int = 500;
    i = 0;
    _root.onEnterFrame = function(){
    if(i == int){
    //choose random mc to play
    var ranMc = Math.random*5+1; <-- if you have 6 mcs
    _root["mcname"+ranMc].gotoAndPlay(2);
    i = 0;
    }
    i++
    }
    Theres an erro in t3h code i cant fix!

  6. #6
    Well, if you aleady have the code to shoot, then just before you perform those actions, have an if/then statement like:
    Code:
    if (bullets > 0) {
    //do the shooting
    }

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012