What are all the variables, others you know in ZScript coding?
#1
Posted 28 May 2018 - 01:08 PM
I prefer posting codings like below.
Link->X deals with Link's X Position
Link->Y deals with Link's Y Position
Game->GetCurDMap0x00 deals with if Link is at DMap 0 screen 00
Game->Counter[DMagic] deals with draining magic
Game->Counter[Magic] deals with magic
Game->RunFFCScript(FFCScript mentioned) will run mentioned FFCScript
Game->RunItemScript(Item Script Mentioned) will run mentioned Item Script
Game->RunGlobalScript(Global Script Mentioned) will run mentioned Global Script
Game->B Wepaon Button Item == Bait
will check (I think) if Bait is B Button Weapon
Game->Enemy0X (I think) deals with
Enemy 0's x position
Game->Instance_of_an_object_Create(x,y) (I think) makes an instance of an object get created at a desired x and y position
Game->EnemyWandBeamSprite(TileNumber) (I think) makes a wand beam shot out by enemy a chosen image
Game->EnemyShootWhat_AndWhatDirection(Enemy #, Weapon, Weapon's Direction) (I think) makes an Enemy shoot a Weapon such as Sword Beam and that Weapon goes in chosen direction such as Left or UpRight
#2
Posted 28 May 2018 - 01:44 PM
zscript.txt and std.txt and std_constants.zh are your friends.
#3
Posted 28 May 2018 - 01:50 PM
#4
Posted 28 May 2018 - 10:35 PM
I'm just going to throw this in here now. Do not change anything in std_constants.zh or you'll break ZC. Read only!
- ShadowTiger likes this
#5
Posted 29 May 2018 - 12:51 PM
Yes, and yes.I prefer (recommend) correcting me on any codes I post wrong if any.
I prefer posting codings like below.
Link->X deals with Link's X Position
Link->Y deals with Link's Y Position
Game->GetCurDMap0x00 deals with if Link is at DMap 0 screen 00
Game->GetCurDMap(), will return the DMap ID value (in decimal). You can use == 0x00 to compare it to the hex value 0x00.
To get the screen ID value, you need Game->GetCurScreen(). There's no function to retrieve both at the same time, nor any practical way to do that anyway, short of offset + &, or something.
Game->Counter[DMagic] deals with draining magic
No, that's Game->DCounter[CR_MAGIC]. The D in DCounter is for drain.
Game->Counter[Magic] deals with magic
The standard value for that array index is: Game->Counter[CR_MAGIC].
Game->RunFFCScript(FFCScript mentioned) will run mentioned FFCScript
Game->RunItemScript(Item Script Mentioned) will run mentioned Item Script
Game->RunGlobalScript(Global Script Mentioned) will run mentioned Global Script
These do not exist. RunFFCScript() is a function of ffcscript.zh, and similar stuff is in std.zh (2.54+). (I might have logged them in a to-do file for future builds?)
You might be thinking of Game->GetFFCScript() (and Game->GetItemScript(), in 2.54).
Game->B Wepaon Button Item == Bait
will check (I think) if Bait is B Button Weapon
Game->Enemy [...]
I'm not sure where you're seeing this stuff, but it doesn't exist.
To check an item button in 2.50.x, use Link->Equipment or the std.zh functions:
GetEquipmentA()
GetEquipmentB()
If you're using the 2.54 alphas, and seeing something like this there, then it's Link->ItemA and Link->ItemB; and Link->SetItemSlot(...).
Enemy 0's x position
For npc pointers, 0 is NULL, so, there's never an 'enemy 0'. In any case, you'd want:
Screen->LoadNPC(index); npc->X //assignAgain, if you are seeing this in changelogs for 2.54, you might be mixing it up with Screen->Enemy[], which is the enemy list.
Game->Instance_of_an_object_Create(x,y) (I think) makes an instance of an object get created at a desired x and y position
Game->EnemyWandBeamSprite(TileNumber) (I think) makes a wand beam shot out by enemy a chosen image
Game->EnemyShootWhat_AndWhatDirection(Enemy #, Weapon, Weapon's Direction) (I think) makes an Enemy shoot a Weapon such as Sword Beam and that Weapon goes in chosen direction such as Left or UpRight
Nope, none of that exists at all. I'll admit that I like object->Create() as future syntax, but for the present, you have Screen->Create*() for each object type. You then need to position it manually with syntax like this:
item foo = Screen->CreateItem(I_RUPEE5); foo->X = 16; foo->Y = 32;Notice that Screen->Create has a return type of the object that you are generating, so it returns to that pointer.
I do like the model:
item bar; bar->Create(type, x, y, ...);That'd be good in the future, as that's how ZC works internally: sprite.add(...) is inherited by weapon, item, and npc on the inside. That binding to items is what caused me so many headaches implementing the FFCore class. :/
- ShadowTiger likes this
#6
Posted 29 May 2018 - 06:03 PM
Thank you so very very much ZoriaRPG you are amazingly awesome dude
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users