<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head>
<script type="text/javascript" language="JavaScript">
function reDo() {
if (innerWidth != origWidth || innerHeight != origHeight)
location.reload();
}
if ((parseInt(navigator.appVersion) == 4) && (navigator.appName == "Netscape")) {
origWidth = innerWidth;
origHeight = innerHeight;
onresize = reDo;
}
onerror = null;
</script>
<style type="text/css">
< !-- div.WebHelpPopupMenu {
position: absolute;
left: 0px;
top: 0px;
z-index: 4;
visibility: hidden;
}
p.WebHelpNavBar {
text-align: right;
}
-->
</style>
<script type="text/javascript">
gRootRelPath = "../../../..";
gCommonRootRelPath = "../../../..";
gTopicId = "9.2.5.10.0_1";
<script type="text/javascript" src="../../../../template/scripts/rh.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/common.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/topic.min.js"></script>
<script type="text/javascript" src="../../../../template/scripts/topicwidgets.min.js"></script>
<script type="text/javascript" src="../../../../whxdata/projectsettings.js"></script>
<link rel="stylesheet" type="text/css" href="../../../../template/styles/topic.min.css"/>
<link rel="stylesheet" type="text/css" href="../../../../template/Charcoal_Grey/topicheader.css"/>
<meta name="topic-status" content="Draft"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>effect_create_below</title>
<meta name="generator" content="Adobe RoboHelp 2019"/>
<link rel="stylesheet" href="../../../../assets/css/default.css" type="text/css"/>
<meta name="rh-authors" content="Mark Alexander"/>
<meta name="topic-comment" content="Reference page for effect_create_below"/>
<meta name="rh-index-keywords" content="effect_create_below,ef_cloud,ef_ellipse,ef_explosion,ef_firework,ef_flare,ef_rain,ef_ring,ef_smoke,ef_smokeup,ef_snow,ef_spark,ef_star"/>
<meta name="search-keywords" content="effect_create_below,ef_cloud,ef_ellipse,ef_explosion,ef_firework,ef_flare,ef_rain,ef_ring,ef_smoke,ef_smokeup,ef_snow,ef_spark,ef_star"/>
</head>
<body>
<div class="topic-header rh-hide" id="rh-topic-header" onclick="rh._.goToFullLayout()">
<div class="logo">
</div>
<div class="nav">
<div class="title" title="effect_create_below">
<span>effect_create_below</span>
</div>
<div class="gotohome" title="Click here to see this page in full context">
<span>Click here to see this page in full context</span>
</div>
</div>
</div>
<div class="topic-header-shadow rh-hide" id="rh-topic-header-shadow"></div>
<h1>effect_create_below</h1>
<p>With this function you can create a simple effect beneath all instances of your room (it is actually created at a depth of 100000). If the effect is anything other <tt>ef_rain</tt> or <tt>ef_snow</tt> then you can define an x/y position to create the
effect, and the size can be a value of 0, 1, or 2, where 0 is small, 1 is medium and 2 is large.</p>
<p>It is worth noting that these effects can have their drawing toggled on and off, as well as have their drawing paused, by using the functions <a href="Particle_Systems/part_system_automatic_draw.htm"><tt>part_system_automatic_draw()</tt></a> and
<a href="Particle_Systems/part_system_automatic_update.htm"><tt>part_system_automatic_update()</tt></a> with the appropriate value for the particle system index (where 0 is for effects below and 1 is for effects above).</p>
<p>The available constants for the different particle kinds are:</p>
<table>
<tbody>
<tr>
<th>Constant</th>
<th>Example</th>
<th>Description</th>
</tr>
<tr>
<td>ef_cloud</td>
<td style="text-align: center"><img alt="cloud effect example" class="icon" src="../../../../assets/Images/Scripting_Reference/GML/Reference/Drawing/ef_cloud.png"/></td>
<td>An effect that creates random cloud particles of varying sizes</td>
</tr>
<tr>
<td>ef_ellipse</td>
<td style="text-align: center"><img alt="ellipse effect example" class="icon" src="../../../../assets/Images/Scripting_Reference/GML/Reference/Drawing/ef_ellipse.png"/></td>
<td>An effect that creates expanding ellipses</td>
</tr>
<tr>
<td>ef_explosion</td>
<td style="text-align: center"><img alt="explosion effect example" class="icon" src="../../../../assets/Images/Scripting_Reference/GML/Reference/Drawing/ef_explosion.png"/></td>
<td>An effect that creates expanding fading explosions</td>
</tr>
<tr>
<td>ef_firework</td>
<td style="text-align: center"><img alt="firework effect example" class="icon" src="../../../../assets/Images/Scripting_Reference/GML/Reference/Drawing/ef_firework.png"/></td>
<td>An effect that creates multiple small particles to generate a firework explosion</td>
</tr>
<tr>
<td>ef_flare</td>
<td style="text-align: center"><img alt="flare effect example" class="icon" src="../../../../assets/Images/Scripting_Reference/GML/Reference/Drawing/ef_flare.png"/></td>
<td>An effect that generates a brilliant point that flares up and fades out</td>
</tr>
<tr>
<td>ef_rain</td>
<td style="text-align: center"><img alt="rain effect example" class="icon" src="../../../../assets/Images/Scripting_Reference/GML/Reference/Drawing/ef_rain.png"/></td>
<td>An effect that generates rain particles coming down from the top of the screen</td>
</tr>
<tr>
<td>ef_ring</td>
<td style="text-align: center"><img alt="circle effect example" class="icon" src="../../../../assets/Images/Scripting_Reference/GML/Reference/Drawing/ef_ring.png"/></td>
<td>An effect that generates expanding and fading circles</td>
</tr>
<tr>
<td>ef_smoke</td>
<td style="text-align: center"><img alt="smoke effect example" class="icon" src="../../../../assets/Images/Scripting_Reference/GML/Reference/Drawing/ef_smoke.png"/></td>
<td>An effect that generates little puffs of smoke</td>
</tr>
<tr>
<td>ef_smokeup</td>
<td style="text-align: center"><img alt="rising smoke effect example" class="icon" src="../../../../assets/Images/Scripting_Reference/GML/Reference/Drawing/ef_smokeup.png"/></td>
<td>An effect that creates a smoke plume that rises up the screen</td>
</tr>
<tr>
<td>ef_snow</td>
<td style="text-align: center"><img alt="snow effect example" class="icon" src="../../../../assets/Images/Scripting_Reference/GML/Reference/Drawing/ef_snow.png"/></td>
<td>An effect that generates multiple snow particles falling down the screen</td>
</tr>
<tr>
<td>ef_spark</td>
<td style="text-align: center"><img alt="spark effect example" class="icon" src="../../../../assets/Images/Scripting_Reference/GML/Reference/Drawing/ef_spark.png"/></td>
<td>An effect that generates a small spark</td>
</tr>
<tr>
<td>ef_star</td>
<td style="text-align: center"><img alt="star effect example" class="icon" src="../../../../assets/Images/Scripting_Reference/GML/Reference/Drawing/ef_star.png"/></td>
<td>An effect that generates star particles</td>
</tr>
</tbody>
</table>
<p> </p>
<h4>Syntax:</h4>
<p class="code">effect_create_below(kind, x, y, size, colour);</p>
<table>
<tbody>
<tr>
<th>Argument</th>
<th>Description</th>
</tr>
<tr>
<td>kind</td>
<td>The kind of effect (use one of the constants listed above).</td>
</tr>
<tr>
<td>x</td>
<td>The x positioning of the effect if relevant.</td>
</tr>
<tr>
<td>y</td>
<td>The y positioning of the effect if relevant.</td>
</tr>
<tr>
<td>size</td>
<td>The size of the effect.</td>
</tr>
<tr>
<td>colour</td>
<td>The colour of the effect.</td>
</tr>
</tbody>
</table>
<p> </p>
<h4>Returns:</h4>
<p class="code">N/A</p>
<p> </p>
<h4>Example:</h4>
<p class="code">if speed > 0<br/> {
<br/> effect_create_below(ef_smoke, x, y, 0, c_gray);<br/> }
</p>
<p>The above code will create a small puff of gray smoke every step that the instance speed is greater than 0 at the instance x,y coordinates.</p>
<p> </p>
<p> </p>
<p> </p>
<div class="footer">
<div class="buttons">
<div class="clear">
<div style="float:left">Back: <a href="Particles.htm">Particles</a></div>
<div style="float:right">Next: <a href="effect_create_above.htm">effect_create_above</a></div>
</div>
</div>
<h5>© Copyright YoYo Games Ltd. 2020 All Rights Reserved</h5>
</div>
</body></html>