MoveObject (object_level2, player)
MoveObject (object_level2, player)
object_level2.alt = object_level1.alt
MoveObject (object_level3, player)
object_level3.alt = object_level2.alt
RemoveObject (object_level1)
AddToInventory (object_level2)
afrotoast wrote:Awesome! It successfully translated the code as "Set Variable (object_level2.alt) = expression (objectlevel1.alt)" in the GUI as well, I will have to test it to make sure it works. Thank you!
I noticed that my code for swapping the objects out was:
RemoveObject (object_level1)
AddToInventory (object_level2)
Whereas you suggested MoveObject instead. Is there any reason to use one over the other, or is it just many ways to get the same thing done?
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="blah">
<gameid>blah</gameid>
<version>1.0</version>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<asl version="550">
// your entire game's content~code, must be between the upper-starting '<asl>' tag and the lower-ending '</asl>' tag
</asl>
<game name="blah">
<gameid>blah</gameid>
<version>1.0</version>
</game>
<object name="room">
// blah stuff for now
</object>
// the default 'player' Player Object tag block:
<object name="player">
// blah
</object>
// and as can be seen, the 'player' Player Object is (placed) inside (see how its indented over) of the default 'room' Room Object:
<object name="room">
// blah
<object name="player">
// blah
</object>
</object>
--------------------------------------------------------------------
// or, instead of (1) "physically" placing the player into the room as seen above, we can do it, this way too:
<object name="room">
// blah Attributes
</object>
<object name="player">
// blah Attributes
<attr name="parent" type="object">room</attr>
</object>
// the (2) 'parent' Attribute does the same thing as the GUI~Editor's add new script: (3) 'MoveObject(moving_Object, destination_Object)' Script
// these 3 ways, are all ways of determining-setting-assigning an Object's current location (such as being inside of another Object)
<asl version="550">
</asl>
<game name="xxx">
</game>
<object name="room">
</object>
<object name="HK">
<attr name="strength" type="int">100</attr>
<attr name="endurance" type="int">100</attr>
<attr name="dexterity" type="int">100</attr>
<attr name="agility" type="int">100</attr>
// etc Attributes
</object>
<function name="xxx">
</function>
// etc etc etc
HK.strength = 100
HK.strength = HK.strength * 10000000
HK.damage = 100000000
orc.dead = false
orc.current_life = 100
a 'fight' Verb's scripting added to the 'orc' Object:
if (orc.dead = false) {
orc.current_life = orc.current_life - HK.damage
msg ("You attack the orc.")
if (orc.current_life <= 0) {
orc.dead = true
msg ("You killed the orc.")
} else {
// the orc attacks you, code lines, (I'm lazy)
}
} else {
msg ("The orc is already dead, silly.")
}
// etc etc etc examples of scripting code lines~blocks
<asl version="550">
<include ref="English.aslx" />
<include ref="Core.aslx" />
<game name="blah">
<gameid>blah</gameid>
<version>1.0</version>
</game>
<object name="room">
<inherit name="editor_room" />
<object name="player">
<inherit name="editor_object" />
<inherit name="editor_player" />
</object>
</object>
</asl>
<asl version="550"><include ref="English.aslx" /><include ref="Core.aslx" /><game name="blah"><gameid>blah</gameid><version>1.0</version></game><object name="room"><inherit name="editor_room" /><object name="player"><inherit name="editor_object" /><inherit name="editor_player" /></object></object></asl>