how do i remove an item while i am playing?
how do i remove an item while i am playing?
such as if the player takes an item from an altar, I would want it to remove a "swamp_sky_1". does anyone know how to do this? thanks in advance.
Grey Island mod(WIP): http://www.grimrock.net/forum/viewtopic ... 99#p123699
Re: how do i remove an item while i am playing?
For which game? (Presumably LoG2; because it's a Sky.)
This is usually done via script, in a script_entity.
Every object has a destroy:() method.
you can destroy an object in either game, by calling the [[ object.id ]] : destroy()
For example:
___
Create (or select) a script_entity on the map, and paste the following into it:
If you wish to destroy the sky object due to the player's action at a specific time, you can activate the script by connecting any trigger object to the script.
This is usually done via script, in a script_entity.
Every object has a destroy:() method.
you can destroy an object in either game, by calling the [[ object.id ]] : destroy()
For example:
Code: Select all
swamp_sky_1:destroy()
Create (or select) a script_entity on the map, and paste the following into it:
Code: Select all
function destroySky(self)
if findEntity:("swamp_sky_1") then
findEntity:("swamp_sky_1"):destroy()
end
end
Re: how do i remove an item while i am playing?
thanks
Grey Island mod(WIP): http://www.grimrock.net/forum/viewtopic ... 99#p123699