Edited by Peteo, 20 February 2013 - 12:04 PM.
Custom "Collectable" Item Question.
#31
Posted 20 February 2013 - 12:04 PM
#32
Posted 20 February 2013 - 12:42 PM
//D1: Screen variable to save to (0-7)
//D2: Time before string is played (minimum 12)
ffc script oneTimeMessage{
void run(int m, int perm, int delay){
if (Screen->D[perm]){
return;
}
else{
Waitframes(Max(12, delay));
Screen->Message(m);
Waitframe();
Screen->D[perm] = 1;
}
}
}
#33
Posted 20 February 2013 - 12:48 PM
#34
Posted 20 February 2013 - 01:07 PM
#35
Posted 15 March 2013 - 10:36 AM
- also being able to reduce the script counter (that I can do)
- but with the counter never going below 0 (I don't know about that)
I can have the player collect items, give them through string control codes, etc. and everything works fine.
But my problem is that if I want to decrease the counter by removing an item, and if it drops below 0, it won't stay at 0 (in fact, it goes to 65535).
Edited by Jamian, 16 March 2013 - 09:28 AM.
#36
Posted 16 March 2013 - 03:01 PM
I'm wondering how you could do something like this while:
- also being able to reduce the script counter (that I can do)
- but with the counter never going below 0 (I don't know about that)
I can have the player collect items, give them through string control codes, etc. and everything works fine.
But my problem is that if I want to decrease the counter by removing an item, and if it drops below 0, it won't stay at 0 (in fact, it goes to 65535).
This is some pretty unqualified advice, but could you make a script that checks if the number goes below 0, at which point, it could set it to 0 (and over ride it going to 65535?)
#37
Posted 16 March 2013 - 03:14 PM
#38
Posted 16 March 2013 - 03:19 PM
You could create a sense of "story progression" by utilizing the string switches. When you talk to a certain person, an invisible counter could be increased. Or when you walk into a certain room you could pick up a dummy item which could also increase the counter. The counter would go up and up, and when it's at a certain level you can speak to a previous NPC and they would switch their string to something else! And you could make the string only appear one time by making an invisible step switch somewhere which would remotely activate a screen secret which would make the tile warp for talking to that person change. Or...do people already do stuff like that?
#39
Posted 16 March 2013 - 03:23 PM
#40
Posted 16 March 2013 - 04:17 PM
You could do that, but there's a much easier way to make NPCs with a popular script (look for "NPC" in the script database) so you won't need warps to their conversations.
Yeah, but some people really don't like scripts...It's my first quest and I don't want to screw around with a bunch of scripts because it will just overly complicate things, and it's hard to find lots of support of scripts. Not to mention, one of the purposes of my quest is to show of what ZQuest can do well without scripts. You wouldn't believe the kind of enemies people on the forums would suggest which are already fully possible in the enemy editor! Ah...but of course, I do know how to install scripts, and sideview ladders are a necessity for me.
#41
Posted 16 March 2013 - 08:23 PM
This is some pretty unqualified advice, but could you make a script that checks if the number goes below 0, at which point, it could set it to 0 (and over ride it going to 65535?)
I know you could have a global script that would check for this, but that would mean checking every frame if counter X is at a correct level, which would undoubtedly slow down the game if you don't have a fast computer.
#42
Posted 16 March 2013 - 08:42 PM
#43
Posted 17 March 2013 - 10:05 AM
global script Active
{
void run()
{
if (Game->Counter[CR_SCRIPT1] > 500) // checking for an abnormally high value, since when it goes negative it changes to 65535
{
Game->Counter[CR_SCRIPT1] = 0;
}
}
}
Edited by Jamian, 17 March 2013 - 10:08 AM.
#44
Posted 17 March 2013 - 01:58 PM
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users