SA-MP Forums Archive
Question about particles - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Question about particles (/showthread.php?tid=304721)



Question about particles - LiamM - 19.12.2011

Hey guys, well I was just wondering. In my script I have a command called /exhale and it allows the player to blow out smoke. (One of SAMP's particle effects) I use it for my RP server, but I was wondering when creating the particle you have to use CreateObject....

But after the smoke has faded away, you no longer see anything. so does that DestroyObject automatically?

For example if I created an object that was a wall.. That wall would not disappear unless I did DestroyObject.
So doe's a particle have a 'transparent' object once the particle has disappeared? Or would that have to be done manually cause that may cause lagg if people are creating invisible objects...


Re: Question about particles - Backwardsman97 - 19.12.2011

I don't think it gets destroyed. Best just to destroy it after to be safe. Or if you were curious, you could do a test.


Re: Question about particles - LiamM - 19.12.2011

What would be the best way? And if I destroyed it after the full smoke effect would happen.. I created a timer to destroy the object but what ways could I test it?


Re: Question about particles - Dark_Kostas - 19.12.2011

new testingobject;(somewhere top of the script)

OnGameModeInit
testingobject = CreateObject

Then use this function to a command to check it.
https://sampwiki.blast.hk/wiki/IsValidObject


Re: Question about particles - LiamM - 19.12.2011

Quote:
Originally Posted by Dark_Kostas
Посмотреть сообщение
new testingobject;(somewhere top of the script)

OnGameModeInit
testingobject = CreateObject

Then use this function to a command to check it.
https://sampwiki.blast.hk/wiki/IsValidObject
Well the object is created under the command the player types so that it gets the players pos then creates it, but I can check if its still a valid object as I assign it to a global variable anyway