Few questions
Posted: Tue Dec 25, 2012 11:55 pm
A couple of quick questions:
1. is there a way to make pits(with or without trap doors) just kill the whole party rather then drop them down 1 level?
2. I made a clone of a shield and gave it a stat of Protection +2 and Evasion +2. However in game, the Protection stat does not apply to the player; the shield clearly says +2 Protection but it just doesnt apply for some reason. The Evasion stat works fine
3. I'm practicing with my scripting and im getting an error "Bad Argument to findEntity (string expected, got nil)". Here is what im doing:
There are 2 pressure plates. the first one checks to see if an entity exists; if it does then destroy it otherwise do nothing. the second spawns the entity. the player will step on the first plate (since the entity isnt spawned, then it should do nothing) then he will step on the second plate (which spawns the entity) finally he will go back to the first which this time will find the entity and destroy it.
I spawn the entity fine, but the destroy part seems to fail. here is my code:
spawn entity:
destroy entity:
there error generates on line "local spawnedEntity = findEntity(skellington)"
thanks. i will probably update this with more questions as i work further :/
1. is there a way to make pits(with or without trap doors) just kill the whole party rather then drop them down 1 level?
2. I made a clone of a shield and gave it a stat of Protection +2 and Evasion +2. However in game, the Protection stat does not apply to the player; the shield clearly says +2 Protection but it just doesnt apply for some reason. The Evasion stat works fine
3. I'm practicing with my scripting and im getting an error "Bad Argument to findEntity (string expected, got nil)". Here is what im doing:
There are 2 pressure plates. the first one checks to see if an entity exists; if it does then destroy it otherwise do nothing. the second spawns the entity. the player will step on the first plate (since the entity isnt spawned, then it should do nothing) then he will step on the second plate (which spawns the entity) finally he will go back to the first which this time will find the entity and destroy it.
I spawn the entity fine, but the destroy part seems to fail. here is my code:
spawn entity:
Code: Select all
function spawnMonster()
spawn("goromorg", 3, 23, 18, 3, skellington)
endCode: Select all
function toospookyforme()
local spawnedEntity = findEntity(skellington)
if spawnedEntity == nil then
print("nil")
else
print("destroy")
skellington:destroy()
end
end thanks. i will probably update this with more questions as i work further :/