<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.shootemupkit.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Custom_Variables</id>
	<title>Custom Variables - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.shootemupkit.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Custom_Variables"/>
	<link rel="alternate" type="text/html" href="https://www.shootemupkit.com/wiki/index.php?title=Custom_Variables&amp;action=history"/>
	<updated>2026-04-09T06:51:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://www.shootemupkit.com/wiki/index.php?title=Custom_Variables&amp;diff=56&amp;oldid=prev</id>
		<title>Wikiadmin: Created page with &quot;==Introduction==  A custom variable is a way of giving a name to a number, some text, or a Boolean value (true or false) and referencing it from within the game.  Some custom...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.shootemupkit.com/wiki/index.php?title=Custom_Variables&amp;diff=56&amp;oldid=prev"/>
		<updated>2020-05-24T12:52:50Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;==Introduction==  A custom variable is a way of giving a name to a number, some text, or a Boolean value (true or false) and referencing it from within the game.  Some custom...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
A custom variable is a way of giving a name to a number, some text, or a Boolean value (true or false) and referencing it from within the game.  Some custom variables could include Gold, which is a number specifying how much gold you have; or Experience Points; or Character Name; or anything you can think of that could be referenced in the game to deepen the experience.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Items within the Shoot ‘Em Up Kit have Properties which are frequently used in Shoot ‘Em Up games, properties such as Score, Lives, Health, etc.  Custom Variables can expand this list to store information specific to your game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To create a custom variable click the [[File:CustomVariable.png|link=]] ''Custom Variable'' icon in the [[Define Menu|Define]] window. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A list of all the custom variables will be shown.  You can modify an existing variable or choose the ''Create New'' option.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:CustomVar1.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can select a name for the variable.  It is good to make this descriptive so that it is clear what it refers to.  You can also choose the type of variable – whether it is a number, a string of text or a Boolean value.  You can also choose a default value and for numeric types you can also set minimum and maximum values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Modifying Values==&lt;br /&gt;
&lt;br /&gt;
Many items that can be placed into levels (including [[Add a Player|Players]], [[Add an NPC|NPCs]], [[Add a Trigger|Triggers]] and [[Add a Timer|Timers]]) support [[Actions Tab|Actions]].  In the ''Action'' tab you can set or modify a variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the ''User Variable'' property and select which variable you want to adjust.  You can then use the ''Data Action'' property to specify whether you’d like to set a new value for the variable; or whether you’d like to Add, Subtract, Multiply or Divide the variable’s value.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:CustomVar2.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Reacting to Custom Variables==&lt;br /&gt;
&lt;br /&gt;
Any item which supports Actions can respond to variables being greater than, less than or equal to a value.  These can be selected in the ''Event'' property on the [[Actions Tab|''Action'']] tab.&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
[[File:CustomVar3.png|link=]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the example below the Player is comparing the new variable we created to the value 5.  If ''My New Variable'' equals 5 then it will trigger all the events specified for this Action event (Upgrading, Changing AI State, Activating other Map Items, etc).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:CustomVar4.png|link=]]&lt;/div&gt;</summary>
		<author><name>Wikiadmin</name></author>
		
	</entry>
</feed>