1. The document provides a translation of common actions used in D&D programming into their equivalent GameMaker Language (GML) code.
2. It lists 25 actions like set variable, test variable, start block, change instance, etc. and shows the corresponding GML code that produces a similar outcome.
3. The GML code directly maps each action sequence to maintain clarity and allow relating actions to GML code.
1. The document provides a translation of common actions used in D&D programming into their equivalent GameMaker Language (GML) code.
2. It lists 25 actions like set variable, test variable, start block, change instance, etc. and shows the corresponding GML code that produces a similar outcome.
3. The GML code directly maps each action sequence to maintain clarity and allow relating actions to GML code.
1. The document provides a translation of common actions used in D&D programming into their equivalent GameMaker Language (GML) code.
2. It lists 25 actions like set variable, test variable, start block, change instance, etc. and shows the corresponding GML code that produces a similar outcome.
3. The GML code directly maps each action sequence to maintain clarity and allow relating actions to GML code.
2b2 LIIeruI TrunsIuIIon Now Iook buck uI IIgure 111 und compure Ihe GML on Ihe IeII wIIh Ihe ucIIons on Ihe rIghI. II IoIIows exucIIy Ihe sume sIrucIure us Ihe orIgInuI sequence oI ucIIons Ior IhIs evenI. We`ve even udded commenIs (In green) Io show you Ihe equIvuIenI ucIIon Ior euch IIne oI GML code. In IhIs cuse, Ihere were 13 ucIIons IhuI huve converIed InIo 13 IInes oI GML, buI IhIs wIII noI uIwuys be Ihe cuse. In zooIdtag.gmk, we huve dIrecIIy mupped euch ucIIon sequence InIo Ihe equIvuIenI GML wIIhouI IukIng uny shorIcuIs Io muke II eusIer Ior you Io reIuIe Ihe GML buck Io your prevIous experIence wIIh ucIIons. So Ior every ucIIon you cun use In D&D progrummIng, Ihere Is un equIvuIenI pIece oI GML IhuI does Ihe sume |ob. We`ve compIIed u IIsI oI Ihe mosI common ucIIons Irom ZooI und how Ihey IrunsIuIe InIo sequences oI GML InsIrucIIons IhuI huve sImIIur, or IdenIIcuI, resuIIs. Tuke some IIme now Io Iook Ihrough Ihe new GML versIon oI ZooI und see how Ihe orIgInuI ucIIons huve been repIuced wIIh code IhuI creuIes u compurubIe ouIcome. Actions and Their GML Equivalents 1. IncIude u Set VuriuhIe ucIIon IhuI seIs Ihe VuriuhIe x Io Ihe VuIue }. x = } (sIundurd)
x = x+} (ReIutive opIIon checked) 2. IncIude u Test VuriuhIe ucIIon IhuI checks II Ihe VuriuhIe x Is equuI to Ihe VuIue }. iT{ x == } ) (equuI to)
iT{ x : } ) (greuter thun) iT{ x : } ) (Iess thun) 3. IncIude u Sturt BIock ucIIon.
move_wta{ 1aIse, true, sprite_height/2 ) (Direction Io verticuI) move_wta{ true, true, stite_width/2 ) (Direction Io hoth) hote The move_wta fuuctiou does uot provide ideutical results to the wrap Screeo actiou iu all situatious, out the code precediug will provide comparaole results providiug the origius of ]our sprites are ceutered. 23. IncIude u Druw Sprite ucIIon IhuI druws Ihe Sprite st_dtagon uI X66, Y55, wIIh u Suhimuge oI }.
dtaw_stite{ st_dtagon, }, 66, 55 ) (sIundurd)
dtaw_stite{ st_dtagon, }, x+66, y+55 ) (ReIutive opIIon checked) 24. IncIude u Creute Instunce ucIIon IhuI creuIes un InsIunce oI Ihe Ohect ob_dtagon uI X66, Y55.
instance_cteate{ 66, 55, ob_dtagon ) (sIundurd)
instance_cteate{ x+66, y+55, ob_dtagon ) (ReIutive opIIon checked) 25. IncIude u Creute Moving ucIIon IhuI creuIes un InsIunce oI Ihe Ohect ob_dtagon uI X66, Y55, wIIh u Speed oI } und Direction oI 210.