Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (TipmyPip, AndrewAMD, NewbieZorro), 16,655 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
I can't shoot after level_load! #365566
03/27/11 15:26
03/27/11 15:26
Joined: Mar 2011
Posts: 38
P
parsgame Offline OP
Newbie
parsgame  Offline OP
Newbie
P

Joined: Mar 2011
Posts: 38
Hi,I have a big problem in my game.when I change the levels I cant shoot something like my weapons hidden.I did download my weapon and enemy code.you can see my problem in below video better .
http://www.youtube.com/watch?v=nsZmo2X72WM
the black box is level changer

Last edited by parsgame; 03/27/11 15:27.
Re: I can't shoot after level_load! [Re: parsgame] #365570
03/27/11 16:09
03/27/11 16:09
Joined: Dec 2009
Posts: 361
R
rtsgamer706 Offline
Senior Member
rtsgamer706  Offline
Senior Member
R

Joined: Dec 2009
Posts: 361
Firstly, cool game, looks really nice.
I think it would be much easier to help you if you could post the relevant section of your code.
Then maybe someone will find a the problem in there.
Good luck!
Rtsgamer706

Re: I can't shoot after level_load! [Re: rtsgamer706] #365577
03/27/11 16:27
03/27/11 16:27
Joined: Mar 2011
Posts: 38
P
parsgame Offline OP
Newbie
parsgame  Offline OP
Newbie
P

Joined: Mar 2011
Posts: 38
thank you.
But which function should I post here?
level changing or weapon code?

Last edited by parsgame; 03/27/11 16:33.
Re: I can't shoot after level_load! [Re: parsgame] #365580
03/27/11 16:33
03/27/11 16:33
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
If your First person weapon is an entity created through ent_create, you will have to create it again after level changing


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: I can't shoot after level_load! [Re: painkiller] #365581
03/27/11 16:34
03/27/11 16:34
Joined: Mar 2011
Posts: 38
P
parsgame Offline OP
Newbie
parsgame  Offline OP
Newbie
P

Joined: Mar 2011
Posts: 38
yes It's entity,I will try to it now.thank you

Re: I can't shoot after level_load! [Re: parsgame] #365582
03/27/11 16:39
03/27/11 16:39
Joined: Mar 2011
Posts: 38
P
parsgame Offline OP
Newbie
parsgame  Offline OP
Newbie
P

Joined: Mar 2011
Posts: 38
Thank you so much it resolved my problem but my ammo will reset to 0 when I create it again.my mean is if I have 5 bullet in my weapon it become 0!

Re: I can't shoot after level_load! [Re: parsgame] #365585
03/27/11 16:46
03/27/11 16:46
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
maybe you can save ammo on another var before changing level, and after level has been changed replace ammo with that saved value


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: I can't shoot after level_load! [Re: painkiller] #365587
03/27/11 17:28
03/27/11 17:28
Joined: Mar 2011
Posts: 38
P
parsgame Offline OP
Newbie
parsgame  Offline OP
Newbie
P

Joined: Mar 2011
Posts: 38
is your mean should I save the ammo with game_save and load with game_load?
or like this?
Code:
var savammo1;
var savammo2;
var savammo3;
var savammo4;
var savammo5;
var savammo6;
var savammo7;

function ammo_count_save()
{
savammo1=ammo1;
savammo2=ammo2;
savammo3=ammo3;
savammo4=ammo4;
savammo5=ammo5;
savammo6=ammo6;
savammo7=ammo7;
}
function ammo_count_load()
{
	ammo1=savammo1;
	ammo2=savammo2;
	ammo3=savammo3;
	ammo4=savammo4;
	ammo5=savammo5;
	ammo6=savammo6;
	ammo7=savammo7;
}



Last edited by parsgame; 03/27/11 17:34.
Re: I can't shoot after level_load! [Re: parsgame] #365589
03/27/11 17:45
03/27/11 17:45
Joined: Aug 2009
Posts: 1,438
Spain
painkiller Offline
Serious User
painkiller  Offline
Serious User

Joined: Aug 2009
Posts: 1,438
Spain
I mean like the code you wrote


3D Gamestudio A8 Pro
AMD FX 8350 4.00 Ghz
16GB RAM
Gigabyte GeForce GTX 960 4GB
Re: I can't shoot after level_load! [Re: painkiller] #365592
03/27/11 17:57
03/27/11 17:57
Joined: Mar 2011
Posts: 38
P
parsgame Offline OP
Newbie
parsgame  Offline OP
Newbie
P

Joined: Mar 2011
Posts: 38
but it didn't work.I did put it here:
Code:
string level_str = <Outside.WMB>; // give file names in angular brackets
string level_str2 = <Outside2.WMB>; // give file names in angular brackets

function level_choose(level_var)
{
	if(level_var==1){	level_load(level_str);return;}
	if(level_var==2){	level_load(level_str2);return;}
}
function oomoomi_func_before()
{
ent_remove(me);
ammo_count_save();///<----------- this function will save current ammo
loading_out();
}


function oomoomi_func_after(npp.x,npp.y,npp.z,levelpan_change)
{
wait(10);
//start to create weapons
PreloadDeagle();
wait(1);
PreloadAk47();
wait(1);
PreloadShotgun();
wait(1);
PreloadRailgun();
wait(1);
Preloadshamshir();
wait(1);
gun_select();
vec_Set(player.x,vector(npp.x,npp.y,npp.z));
player.pan=levelpan_change;
ammo_count_load();/////<--------- I add this function here load my ammo
}
//////////////////

function func_level_to_river()
{
oomoomi_func_before();
level_choose(2);
oomoomi_func_after(3347,-11514,615,55);
}


action level_to_river
{
changer_setting();
my.event=func_level_to_river;
}



Last edited by parsgame; 03/27/11 17:59.
Page 1 of 2 1 2

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