• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Removing an object

Evan

A splendid one to behold
Senator
Premium User
Joined
May 6, 2009
Messages
7,018
Solutions
1
Reaction score
1,040
Location
United States
I had this script working before, but I lost it. I can't remember how it was done.

Here is a picture for example:

1iy7te.png


In this picture, I placed a crack sprite on the map after using an item.
What is supposed to happen next is if you step on it, it will damage you and the crack will disappear.

What is the problem?
The crack is not disappearing.

It may be so simple, I apologize, it's been a long day for, I can't seem to think straight.
If anyone knows how to do it, please help me out.

Here is the code I have so far.
(for transforming item, the reason why I have item.uid - 1 is because I thought it would remove it (similar to storageids)).

LUA:
function onStepIn(cid, item, pos)
	if(item.itemid == 6299) then
		if(isPlayer(cid)) then
			doTargetCombatHealth(0, cid, COMBAT_PHYSICALDAMAGE, -100, -200, CONST_ME_FIREAREA)
			doTransformItem(item.uid, item.uid - 1)
		end
	end
	return true
end

Thanks,
Evan
 
What do you mean? I have the action script working.
I'm just having a little bit of trouble getting the cracks removed via movement script.
 
Back
Top