|
I can't shoot after level_load!
#365566
03/27/11 15:26
03/27/11 15:26
|
Joined: Mar 2011
Posts: 38
parsgame
OP
Newbie
|
OP
Newbie
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=nsZmo2X72WMthe black box is level changer
Last edited by parsgame; 03/27/11 15:27.
|
|
|
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
parsgame
OP
Newbie
|
OP
Newbie
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
Serious User
|
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: parsgame]
#365585
03/27/11 16:46
03/27/11 16:46
|
Joined: Aug 2009
Posts: 1,438 Spain
painkiller
Serious User
|
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
parsgame
OP
Newbie
|
OP
Newbie
Joined: Mar 2011
Posts: 38
|
is your mean should I save the ammo with game_save and load with game_load? or like this?
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
Serious User
|
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
parsgame
OP
Newbie
|
OP
Newbie
Joined: Mar 2011
Posts: 38
|
but it didn't work.I did put it here:
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.
|
|
|
Moderated by mk_1, Perro, rayp, Realspawn, Rei_Ayanami, rvL_eXile, Spirit, Superku, Tobias, TSG_Torsten, VeT
|