Gamestudio Links
Zorro Links
Newest Posts
Max Number of Strategies in /Strategy folder
by Martin_HH. 06/17/26 07:16
Z9 getting Error 058
by jcl. 06/16/26 09:51
How to select between IB accounts by script?
by AndrewAMD. 06/13/26 15:44
Zorro tutorial ideas?
by AndrewAMD. 06/13/26 15:01
Zorro 3.01 recoded MMI function issue
by 11honza11. 06/13/26 11:40
Stooq now requires an API key
by AndrewAMD. 06/11/26 17:55
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 3,809 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Student_64151, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
hand gun reload cycle #402658
06/08/12 17:41
06/08/12 17:41
Joined: May 2012
Posts: 15
italy
M
mimmo86 Offline OP
Newbie
mimmo86  Offline OP
Newbie
M

Joined: May 2012
Posts: 15
italy
can i create a reload cycle (like Survie!game) for my gun in the shooter template?
thanks

Re: hand gun reload cycle [Re: mimmo86] #402664
06/08/12 19:27
06/08/12 19:27
Joined: Jul 2008
Posts: 2,112
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,112
Germany
Do you read what people post you ?!? I already answered this question two times to you if reload cycle means reload animation ?

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Main=47961&Number=401619#Post401619

http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Main=48038&Number=402245#Post402245

Last edited by rayp; 06/08/12 19:28.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: hand gun reload cycle [Re: rayp] #402735
06/09/12 18:25
06/09/12 18:25
Joined: May 2012
Posts: 15
italy
M
mimmo86 Offline OP
Newbie
mimmo86  Offline OP
Newbie
M

Joined: May 2012
Posts: 15
italy
sorry:....I want my gun shot 7 bullet,after I must reload other 7 bullet and display this in my hud....

Re: hand gun reload cycle [Re: mimmo86] #402825
06/10/12 16:06
06/10/12 16:06
Joined: Jul 2008
Posts: 2,112
Germany
rayp Offline

X
rayp  Offline

X

Joined: Jul 2008
Posts: 2,112
Germany
You should start to learn from tuts not ask people to write your code. Anyway heres a small example to show the logic.

Code:
var Ammo_Clip = 6;  //the clipsize of your weapon
var Ammo_Shot = 0;  //bullets shot
var Ammo      = 12; //amount of bullets
var Ammo_Rest = 0;  //ammo_clip-ammo_shot

function _firing()
{
 if (Ammo_Shot < Ammo_Clip && Ammo > 0) Weapon_Is_Able_To_Fire();
 else return; //need reload or no bullets to fire !

 Ammo_Shot += 1;
 Ammo -= 1;
 Ammo_Rest = Ammo_Clip - Ammo_Shot;
 ..
 .
}

function _reload()
{
  while(Ammo_Shot > 0)
  {
   Ammo_Shot -= 1;
   Ammo -= 1;
   if(Ammo <= 0) break;
   ..
   .
   wait(1);
  }
}

BMAP* Pan_Map....
FONT* digit_font = "digit.pcx";

PANEL* Ammo_pan =
{
  bmap = Pan_Map;
  digits(0,0 ,4,digit_font,1000,Ammo);     //show all bullets
  digits(0,50,4,digit_font,1000,Ammo_Rest);//bullets left in clip
  flags = SHOW;
}



Last edited by rayp; 06/11/12 16:18.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;

Moderated by  HeelX, rvL_eXile 

Gamestudio download | 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