Fire/Ice Arrow Script
#1
Posted 05 March 2009 - 10:05 AM
The low-down: I have two level 2 arrows, Fire Arrow and Ice Arrow.(Light Arrow is level 3 so it doesn't matter ) They both trigger Level 2 Arrow flags, which is good because I want them to. However, I also want them to trigger individual flags. For example, Flag 100 could be something you can burn with the fire arrow, and 101 for something you can freeze. I plan to have a lot of those kinds of puzzles in the game, so, help me out?
#2
Posted 06 March 2009 - 01:24 AM
item script EnchantArrow{
void run(int wtype, int wdam, int wspeed, int wcset, int wtile){
lweapon l;
l = Screen->CreateLWeapon(wtype);
l->X=Link->X;l->Y=Link->Y;
l->Step=wspeed;
l->Damage=wdam;
if(wcset>0)l->CSet=wcset;
if(wtile>0)l->Tile = wtile;
laser->Dir = Link->Dir;
}
}
D[]vars:
type; Important to set this. Look in std.zh for lweapon values.
damage.
speed. (100 - 700 recommended)
cset(optional- no need to set)
tile(optional- no need to set)
Edited by Gleeok, 06 March 2009 - 01:27 AM.
#3
Posted 06 March 2009 - 04:37 AM
#4
Posted 06 March 2009 - 07:24 AM
So it sounds like you want custom flags?
Is this possible, and if so, would someone mind explaining how to do it?
#5
Posted 06 March 2009 - 10:12 AM
Though you'd have to look up the proper array entry in std.zh cause I just made that one up.
#6
Posted 06 March 2009 - 12:28 PM
Fire arrow is level 3 now, but I want to prevent it from activating level 2 secrets. Light arrow is level 4, but I want it to activate its own secret flag, but not activate level 2 and 3 secrets.(level 1 is fine, since its the unenchanted arrow.)
#7
Posted 06 March 2009 - 05:13 PM
#8
Posted 06 March 2009 - 07:16 PM
Is there anything you can do?
Edited by Alestance, 06 March 2009 - 07:17 PM.
#9
Posted 11 March 2009 - 01:15 AM
Is there anything you can do?
Of course. First I'd give each weapon a unique "identifier", such as a certain tile that only that weapon uses. Then decide which flags to use for them. Secondly, it's going to be in a global script.
That should be the only requirements I need.
..if you still need it that is.
#10
Posted 12 March 2009 - 02:34 PM
Explain Unique Identifier, though.
#11
Posted 13 March 2009 - 12:33 AM
Also I'd like to do this in one shot, so list any and every custom weapon flag you want to be able to trigger by link weapons. (Or I could just make 5 dummy slots and you could fill them in later.)
There is still one problem. There is no SS_SECRETS = true type flag, so I'm still waiting for someone to help me out with that.
const int ST_DOORUP = 0; // The locked/bomb door has been permanently unlocked/bombed
const int ST_DOORDOWN = 1; // The locked/bomb door has been permanently unlocked/bombed
const int ST_DOORLEFT = 2; // The locked/bomb door has been permanently unlocked/bombed
const int ST_DOORRIGHT = 3; // The locked/bomb door has been permanently unlocked/bombed
const int ST_SECRET = 13; // Screen Secrets have been made permanent
const int ST_ITEM = 4; // If set, the item is gone
const int ST_SPECIALITEM = 5; // If set, the Cave/Item Cellar/Dive For Item/Armos item is gone
const int ST_ENEMYNORETURN = 6; // If set, enemies won't return
const int ST_TEMPNORETURN = 7; // If set, enemies won't return. This is automatically unset when you leave the DMap
const int ST_LOCKBLOCK = 8; // The lock block on the screen has been triggered
const int ST_BOSSLOCKBLOCK = 9; // The boss lock block on the screen has been triggered
const int ST_CHEST = 10; // The unlocked chest on this screen has been opened
const int ST_LOCKEDCHEST = 11; // The locked chest on this screen has been opened
const int ST_BOSSCHEST = 12; // The boss chest on this screen has been opened
const int ST_VISITED = 14; // If set, this screen will appear on the Overworld Map
There is ST_SECRET, but that just makes them permanent, and there doesn't seem to be one that actually can TRIGGER secrets.
#12
Posted 13 March 2009 - 09:50 AM
Link->PitWarp(Game->GetCurDMap(),Game->GetCurScreen());
Obviously 'Full Screen Warp' or whatever it's called nowadays might be something you want checked.
#13
Posted 13 March 2009 - 08:06 PM
I don't think anybody would want to use this code:
{
void run()
{
int d;
while(true)
{
if(Link->InputL && d == 0) {
Screen->State[13] = true;
Link->PitWarp(Game->GetCurDMap(),Game->GetCurScreen());
d = 15;
}
Waitframe();
if(d > 0) d--;
}
}
}
#14
Posted 14 March 2009 - 06:02 AM
{
void run()
{
int d;
while(true)
{
if(Link->InputL && d == 0) {
Screen->State[13] = true;
Link->PitWarp(Game->GetCurDMap(),Game->GetCurScreen());
d = 15;
}
Waitframe();
if(d > 0) d--;
}
}
}
Why write it then?
I'll add it to my list of 'things I might try adding to ZScript'.
#15
Posted 14 March 2009 - 07:22 AM
Something unique for each weapon that is accessible via scripts. What I like to do is give them different tiles, even if they use the same graphic. Just copy/paste them in the tile page and make sure only one weapon uses that tile/tiles. Simple no?
Also I'd like to do this in one shot, so list any and every custom weapon flag you want to be able to trigger by link weapons. (Or I could just make 5 dummy slots and you could fill them in later.)
There is still one problem. There is no SS_SECRETS = true type flag, so I'm still waiting for someone to help me out with that.
There is ST_SECRET, but that just makes them permanent, and there doesn't seem to be one that actually can TRIGGER secrets.
I'm still not getting it.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users