Coders: Question!

2 replies [Last post]
Luelle
User offline. Last seen 3 years 27 weeks ago. Offline
Joined: 2010-11-26
Posts: 72

Hi!

I try to create a new mode/script. For that, i took the "highlander.lua" and learn how that works.
I'm not a coder, but interested in it. I hope it works... Wink Smiley

I found this, and wanted to change the Medi-Packs:

Quote:
function onGameInit()
GameFlags = gfInfAttack + gfRandomOrder
HealthCaseProb = 100

I want weapon boxes to be included, so I changed the "100" (isn't that the percent-number?), but no Weaopon-Boxes appear!? No matter, if I change it to 5, 20 or 50. Only Medi-Packs!

Where do I have influence for that in the "highlander.lua"?
Is there a special command?

Thanks for help!
_

Luelle
User offline. Last seen 3 years 27 weeks ago. Offline
Joined: 2010-11-26
Posts: 72

Maybe I found the answer myself...

Is it this?

Quote:
function onAmmoStoreInit()
SetAmmo(amSkip, 9, 0, 0, 0)
SetAmmo(amKamikaze, 9, 0, 0, 0)
--SetAmmo(amSwitch, 9, 0, 0, 0) -------1
end

Vatten
Vatten's picture
User offline. Last seen 1 year 8 weeks ago. Offline
Joined: 2009-09-02
Posts: 48

try to set the HealthCaseProb to lesser than 100.
And modify SetAmmo for each weapon you want to have in the crates. You should read more about it here:
http://code.google.com/p/hedgewars/wiki/LuaAPI#SetAmmo_%28ammoType,_count,_probability,_delay,_numberInCrate%29

Vattenania, my beloved motherland, my beloved homeland! You are always with me in my thoughts and in my heart!

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]