Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

I don't, but please ask any questions here and I'll answer them as soon as I'm able.

Hi Yal

I'm currently playing GP gun_10.  Could you tell me how many teleports there are because so far I found 6 (1,2,3,4,8,9).  I was in the Deep Cave and when I came back I lost a bat.  Is it possible to recover it?  Once I'm in the ruins of Bathville and I've found the key to the Sigma station, I can't go any further because when I fall down between two bats, I'm thrown into a room where all the doors are closed.  I was also looking for Waterfall, where there is supposedly some secret, but I don't know where it is

I'm asking for help because I'm starting to go crazy

Regard

s

Okay, in the playerweapons script, is global.weapon_data being initialized anywhere? 
I am getting the following error when trying to pick up an object that should in theory put a "knife" weapon in the our global.player_weapons array.

___________________________________________

############################################################################################

ERROR in

action number 1

of  Step Eventobj_player

for object obj_knife_pickup:

trying to index a variable which is not an array

 at gml_Script_playerweapon_register_new_scr_playerweapons_gml_GlobalScript_scr_playerweapons (line 309) -        array_copy(data,0,global.weapon_data[wid],0,PWD_LOCALDATA_MAX)

############################################################################################

gml_Script_playerweapon_register_new_scr_playerweapons_gml_GlobalScript_scr_playerweapons (line 309)

gml_Object_obj_knife_pickup_Collision_obj_player (line 7) -        playerweapon_register_new(wid_KNIFE)


The relevant knife data is filled out in playerweapons_init_all(). 

Any idea whats going on? 

playerweapons_init_all inits all the weapon data, normally it's created by the obj_setup (which sets up all the other data as well). Did you remove the blank first room that sets everything up (or change the starting room to a different one)?

global.weapon_data[wid] is probably what's not an array here, try printing it with a show_debug_message within playerweapon_register_new and it should tell you what it is (if it contains 'undefined' or crashes with an 'accessing array out of bounds' error you don't actually add the knife data as expected and then you most likely don't run the init script at all)

It would probably be possible to remove the playerweapons_init_all script entirely (code inside a script file but not inside a function body will be run when the game loads, this can be used to set up global variables earlier than normal and ensure that code is only ran once), the order of execution between different script files isn't guaranteed though so use with care.

(+1)

I'm running things from my own game, so I wasn't aware of that room actually. I'll take a look at that , thanks!