User Tools

Site Tools


add_effect

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
add_effect [2024/01/27 13:14] justinadd_effect [2024/01/27 14:24] (current) justin
Line 1: Line 1:
 ======Add Effect====== ======Add Effect======
 ---- ----
-Adds [[character|character]] to the specified [[tile|tile]] within the [[map|map]] (if the [[tile|tile]] is not already occupied by another [[character|character]]). The [[entity|entity]] ID is optional and will be assigned to the new [[character|character]] if supplied.+Adds an [[effect]] at the specified [[coordinate]] within the [[map]]. The [[entity]] ID is optional and will be assigned to the new [[effect]] if supplied. If the [[effect]] is configured as "One Shot", it will need to be enabled via the [[Enable Effect]] function once it has been added to the [[map]].
  
 ====Signature:==== ====Signature:====
 <code python> <code python>
-add_character(effect_name, coordinate, entity_id)+add_effect(effect_name, coordinate, entity_id)
 </code> </code>
  
 ^Argument^Description^Type^Required^ ^Argument^Description^Type^Required^
 |effect_name|Particle effect to use for the new [[effect]].|[[string|String]]|Yes| |effect_name|Particle effect to use for the new [[effect]].|[[string|String]]|Yes|
-|coordinate|ID or [[coordinate|coordinate]] of the [[tile|tile]] where the [[character|character]] will be placed.|[[string|String]], [[coordinate|Coordinate]]|Yes|+|coordinate|[[Coordinate]] where the [[effect]] will be placed.|[[coordinate|Coordinate]]|Yes|
 |entity_id|Unique [[entity|entity]] ID that will be assigned.|[[string|String]]|No| |entity_id|Unique [[entity|entity]] ID that will be assigned.|[[string|String]]|No|
  
 <WRAP center round info 100%> <WRAP center round info 100%>
-The [[remove_entity|Remove Entity]] function can be triggered later to remove [[character|character]] that was previously added to the scene with the Add Character function.+The [[remove_entity|Remove Entity]] function can be triggered later to remove an [[effect]] that was previously added to the scene with the Add Effect function.
 </WRAP> </WRAP>
  
 ^Return Value^Description^Type^ ^Return Value^Description^Type^
-|Character Added|Returns a reference to the [[character]] that was added.|[[Entity]]|+|Effect Added|Returns a reference to the [[effect]] that was added.|[[Entity]]|
  
 ====Example:==== ====Example:====
Line 24: Line 24:
 add_effect("flame", coord[0, 0, 0], "flame_01"); add_effect("flame", coord[0, 0, 0], "flame_01");
 </code> </code>
-//Results:// A flame [[effect]] will be added to the [[map|map]] at [[coordinate]] (0, 0, 0) and will be assigned an ID of "flame_01".+//Results:// A flame [[effect]] will be added to the [[map|map]] at the XYZ [[coordinate]] of (0, 0, 0) and will be assigned an ID of "flame_01".
  
 <WRAP center round tip 100%> <WRAP center round tip 100%>
-Use the **Add Effect** function to...+Use the **Add Effect** function to add weather or environmental effects to a scene, e.grain or snow to cover an outdoor [[map]], or flames to indicate that something has caught on fire.
 </WRAP> </WRAP>
  
Line 39: Line 39:
  
 <WRAP half column> <WRAP half column>
-====Visual Demo:==== 
-{{:add_effect_demo.gif?nolink|}} 
 </WRAP> </WRAP>
 </WRAP> </WRAP>
  
 ~~NOTOC~~ ~~NOTOC~~
add_effect.1706390078.txt.gz · Last modified: 2024/01/27 13:14 by justin