Quote: "Here is the script for "JumpToLevelIfUsed(e).LUA" BTW after i removed the LUA from the title, it didnt give me an error."
There is something I don't understand; why you rename script as "JumpToLevelIfUsed(e).LUA"?
Script should name as _init/_main statement, ie: if your script say..
function winzone_health_init(e)
end
Your script should name: "winzone_health.lua" (notice there is not capital letters), or you will get a LUA error.
don't change nothing in the script I gave you, open a new empty map, add a soldier firts, after add the player, so the soldier will be number 1, add some barrel and attach the script to it, and try it.
function winzone_health_main(e)
PlayerDist = GetPlayerDistance(e)
if PlayerDist < 2000 then
if g_Entity[1]['health'] <= 50 then JumpToLevelIfUsed(e) end
end
end --PlayerDist
end --main
If you decide to try with your bear level remember you must type the next level name to the bear properties, into the
ifUsed field.
You must have a least 2 levels, guessing they naming level1 and level2; in the level1 you has to type "level2", in the
ifUsed field of the bear properties.
And where script say:
if g_Entity[1]['health'] <= 50 then JumpToLevelIfUsed(e) end
it shoul look like this:
if g_Entity[e]['health'] <= 50 then JumpToLevelIfUsed(e) end
since"e" is the bear and their script is attached to him.
Hard to help with unknown script like your, and I can't see it since it is a store item, and I don't own the dagored bear, perhaps if you pm him, would be better.
3com
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz
OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4