Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
3 registered members (AndrewAMD, Grant, Neb), 908 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Rate of Fire Control Script #280125
07/21/09 01:34
07/21/09 01:34
Joined: Jul 2009
Posts: 85
A
Altarius Offline OP
Junior Member
Altarius  Offline OP
Junior Member
A

Joined: Jul 2009
Posts: 85
Hi,

Im trying to write a script for make a Automatic firing machine gun...but all my attemps are not really good.Anyone can show me a Lite-C script for doing that plz?

Re: Rate of Fire Control Script [Re: Altarius] #280194
07/21/09 12:39
07/21/09 12:39
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Search the manual for Tracing/Scanning functions.

Re: Rate of Fire Control Script [Re: Cowabanga] #280195
07/21/09 12:40
07/21/09 12:40
Joined: Nov 2008
Posts: 946
T
the_clown Offline
User
the_clown  Offline
User
T

Joined: Nov 2008
Posts: 946
I think he doesn't mean a turret but he wants to know how to make his weapon shoot in quick rates...

Re: Rate of Fire Control Script [Re: the_clown] #280230
07/21/09 15:39
07/21/09 15:39
Joined: Jul 2009
Posts: 85
A
Altarius Offline OP
Junior Member
Altarius  Offline OP
Junior Member
A

Joined: Jul 2009
Posts: 85
Yea, i want to know how to control the rate of my bullet spawn...need a counter or something like that?

Re: Rate of Fire Control Script [Re: Altarius] #280281
07/22/09 00:41
07/22/09 00:41
Joined: Jul 2008
Posts: 1,178
England
M
MrGuest Offline
Serious User
MrGuest  Offline
Serious User
M

Joined: Jul 2008
Posts: 1,178
England
set a simple skill like
Code:
#define _can_fire skill99 //will write my.skill99 when compiling but makes it easier to read



then in your function have
Code:
#define key_fire key_a //same as above for for pressing key_a... change to appropriate fire key
while(key_fire){

   if(my._can_fire){
     my._can_fire = FALSE;
     //bullet_spawn / call fire script, ent_create(bullet etc,,,
     wait(-1); //wait 1 second until can fire again
     my._can_fire = TRUE;
   }
}


hopefully enough to point you oin the right direction
*untested*

Re: Rate of Fire Control Script [Re: MrGuest] #280293
07/22/09 03:38
07/22/09 03:38
Joined: May 2009
Posts: 258
Chicago
J
Jaeger Offline
Member
Jaeger  Offline
Member
J

Joined: May 2009
Posts: 258
Chicago
What type of gun are you using? A real type of machine gun, or a fantasy one? If it's a real gun, I can help you set it up just like the real thing.

1 second for a machine gun is EXTREMELY slow...


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1