Difference between revisions of "064F"

From GTAMods Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
{{OpCode
 
{{OpCode
| ini        = 064F=1, %1d%
+
| games      = {{Icon|SA}}
| description = Releases a [[Particle_(SA)|particle]] from memory and makes it visible.
+
| command    = PLAY_AND_KILL_FX_SYSTEM
| p1          = Existing particle handle
+
| description = Makes the [[Particle (SA)|particle]] visible and marks it as no longer needed
| game        = [[San Andreas]]
+
| syntax1    = 064F: remove_references_to_particle [''particle handle'']
 +
| p1t        = [''particle handle'']
 +
| p1d        = The handle of the particle
 
}}
 
}}
This opcode releases a particle from memory and makes it visible.
 
  
== Sanny Builder example ==
+
== Example ==
 
+
The following example using Sanny Builder will create a particle effect at the player's location while the Z key is pressed.
<source lang="scm">064F: remove_references_to_particle 167@ </source>
+
{{Pre|class=sb-code|1=
 
+
<span class="k">while</span> <span class="k">true</span>
 
+
    <span class="k">wait</span> <span class="m">0</span>
==Cleo Example==
+
    <span class="k">if</span>
 
+
        [[0256]]:   player <span class="nv">$PLAYER_CHAR</span> defined
That example creates an particle at player's location by pressing Z.
+
    <span class="k">then</span>
<source lang="scm">
+
        <span class="k">if</span>
{$CLEO .cs}
+
            [[0AB0]]:  key_pressed <span class="m">90</span>  <span class="c1">// Z</span>
 
+
        <span class="k">then</span>
0000: NOP
+
            [[04C4]]: store_coords_to <span class="nv">1@</span> <span class="nv">2@</span> <span class="nv">3@</span> from_actor <span class="nv">$PLAYER_ACTOR</span> offset <span class="m">0.0</span> <span class="m">5.0</span> <span class="m">1.0</span>
 
+
            [[064B]]: <span class="nv">0@</span> = create_particle <span class="s2">"flame"</span> at <span class="nv">1@</span> <span class="nv">2@</span> <span class="nv">3@</span> type <span class="m">4</span>
:NONAME_01
+
            064F: make_temp_particle_visible_and_remove_references <span class="nv">0@</span>
0001: wait 0 ms
+
            <span class="k">wait</span> <span class="m">500</span> ms
if and
+
        <span class="k">end</span>
0256: player $PLAYER_CHAR defined
+
    <span class="k">end</span>
0AB0:  key_pressed 90 // Z or z
+
<span class="k">end</span>
004D: jump_if_false @NONAME_01
+
}}
04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR offset 0.0 5.0 1.0 //store player coords
 
064B: 0@ = create_particle "flame" at 1@ 2@ 3@ type 4 //create the particle
 
064F: make_temp_particle_visible_and_remove_references 0@ //make the particle visible and remove references
 
0001: wait 500 ms
 
0002: jump @NONAME_01 </source>
 
 
 
==Keywords==
 
particle, visible, free memory
 
  
==See also==
+
== Keywords ==
* [[Particle_(SA)|Particle (SA)]]
+
particle, visible, kill, fx, system

Latest revision as of 05:32, 22 December 2016

San Andreas PLAY_AND_KILL_FX_SYSTEM


Description
Makes the particle visible and marks it as no longer needed
Syntax
064F: remove_references_to_particle [particle handle]
Parameter
[particle handle]
The handle of the particle

Example

The following example using Sanny Builder will create a particle effect at the player's location while the Z key is pressed.

while true
    wait 0
    if
        0256:   player $PLAYER_CHAR defined
    then
        if
            0AB0:   key_pressed 90  // Z
        then
            04C4: store_coords_to 1@ 2@ 3@ from_actor $PLAYER_ACTOR offset 0.0 5.0 1.0
            064B: 0@ = create_particle "flame" at 1@ 2@ 3@ type 4 
            064F: make_temp_particle_visible_and_remove_references 0@ 
            wait 500 ms
        end
    end
end

Keywords

particle, visible, kill, fx, system