Fortress Forever

Go Back   Fortress Forever > Editing > Mapping > Lua

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 01-30-2009, 03:26 AM   #1
Bridget
Banned
 
Bridget's Avatar
 
Join Date: Sep 2008
Class/Position: Soldier
Gametype: AVD
Affiliations: TALOS
Posts Rated Helpful 5 Times
Deleting an info_ff_script?

I have multiple instances of the same script in my map. When the player touches one of them, that specific one should disappear (get removed). How do I delete the info_ff_script? RemoveEntity(self) doesn't work and OutputEvent("","Kill") would require I make a different script for each instance in the map (50+).

Code:
a_special_script = info_ff_script:new({
	name = "A script!"
	touchflags = {AllowFlags.kOnlyPlayers,AllowFlags.kYellow},
	model = "models/items/ball/ball.mdl"
})

function a_special_script:touch(touch_entity)
	if IsPlayer(touch_entity) then
		-- remove the specific script touched here.
	end
end

Last edited by Bridget; 01-30-2009 at 04:18 AM.
Bridget is offline   Reply With Quote


 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:29 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.