#638 posted by
Tribal on 2021/07/11 14:02:47
I don't know if this is the right place to ask, but i have some questions about parms (specifically "SetNewParms" from client.qc)...
In my mod you start the game with a flashlight. It will consumes armor energy if you turn it on, so i give the player the green armor with 50 points of energy when he starts a map:
On SetNewParms i made these changes:
parm1 = IT_SHOTGUN | IT_AXE| IT_LANTERN| IT_ARMOR1; //it_lantern is the flashlight and it_armor1 is the green armor
parm3 = 50; //this is the armor points/value
parm9 = self.armortype = 0.3; //this is the green armor type
(I also made some changes on the "SetChangeParms" code, but that doesn't matter here because the problem is with the SetNewParms code)
My code works perfectly when i load start.bsp, but today i played "Escape from Quakertraz", a custom map that has its own start map called "efq_start.bsp". The map refused to load and the console gave me this:
Address 28(self)entity 0 174(armortype).armortype 4341(?)
client.qc: SetNewParms
(no function)
assignment to world entity
So i made an exception on my "SetNewParms" for this map (changing parm9 back to 0 again, like it was in the original code):
if (world.model == "maps/efq_start.bsp")
parm9 = 0;
And now i can load the map perfectly...
My questions are:
1- Why is this map having a problem with "SetNewParms" if this code is supposed to be called only by the original "start.bsp" and not by some custom start map with another name? :P
2-Why the original start.bsp works fine with "parm9 = self.armortype = 0.3" and this custom map only works with "parm9 = 0"??
It makes no sense to me!
Tribal:
#639 posted by
metlslime on 2021/07/12 18:37:29
So, the best place to ask this is in the <q href="https://www.celephais.net/board/view_thread.php?id=60097&page=last">Coding Help</a> thread, I'll reply there.
#640 posted by
metlslime on 2021/07/12 18:37:51
also. laugh at my failure to make a hyperlink.