yo wonderin if you could help
eltimo
|
okay, i get the earthquake but mapswitch seems to be way more complicated than in the manual????
Posted on 2006-06-21 12:04:02
|
Overkill
|
Well, the manual just shows you how to switch the map and tells you that nothing after calling Map() will happen.
My code just takes this one step further, showing a way to set up for events before you actually do them.
If you want some clarification, I can help. Just ask me about what's particularly more complicated and confusing.
If it's about the flags stuff, I can explain that. Basically, it's just a way of holding a bunch of the info in your game, without making things particularly messy. Mainly just whether or not something's happened before, or whether or not something needs to happen.
So, in your system.vc somewhere, you'd put something like:
// Plot and miscellaneous flags.
#define FLAG_CRYSTAL_WENT_EVIL 1
#define FLAG_TAUNTED_BY_RIVAL 2
#define FLAG_TAUNTED_BY_RIVAL_AGAIN 3
#define FLAG_FANSERVICE_SCENE 4
#define FLAG_VILLAGE_BURNED_TO_ASH 5
#define FLAG_CRYSTAL_REAPPEARS 6
#define FLAG_FOUGHT_EVIL_BOSS_SLIME 7
#define FLAG_GAVE_FLOWERS_TO_LOVE_INTEREST 8
#define FLAG_COMEDY_RELIEF_SCENE 9
#define FLAG_SPAWN_BOB 10
#define FLAG_TRAGIC_TURN_OF_EVENTS 11
// Treasure chest flags.
#define FLAG_BUMSVILLE_CHEST_SECRET 100
#define FLAG_BUMSVILLE_CHEST_DEXTER 101
#define FLAG_BUMSVILLE_CHEST_ARMORY 102
// The flags container.
int flags[10000];
Posted on 2006-06-21 14:44:20 (last edited on 2006-06-21 14:47:35)
|
eltimo
|
I just get confused with the whole flag thing, is it like cases. It just confuses me and theres not really anything i've come across that explains it
Posted on 2006-06-21 15:22:21
|
Gayo
|
Flags aren't inherently a part of the engine, they're just a good idea. It's just the way game coders handle plot and events. Like, if you want to make sure the player can't leave town before talking to the king, you might #define some flag (the lowest number that isn't being used for something else, usually) as TALK_TO_KING. It'll default to 0, and you can set it to 1 once the player has talked to the king, and then check if it's 1 before letting the player out of town. So yes, you often would do a switch statement on a flag, but that's not the only thing they're for.
Generally when you make a game your main flags are set for the entire game, saved when you save, and reloaded when you load, and you have tons of them because even stuff like which chests you've opened needs to be "remembered" by the game. Some people keep a secondary array of temporary flags that get wiped when you leave the area, but that's a more advanced topic.
Posted on 2006-06-21 18:03:42 (last edited on 2006-06-21 18:04:13)
|
Overkill
|
Yeah, the reason for flags[] and a ton of #define statements, as opposed to a ton of variables, is because it's a lot easier to save.
Instead of: FileWriteQuad(file, talked_to_king);
FileWriteQuad(file, found_almighty_sword_of_light);
FileWriteQuad(file, was_delighted_by_fanservice_scene);
FileWriteQuad(file, spoke_with_bob); It's just: for (i = 0; i < 10000; i++)
{
FileWriteQuad(file, flags[i]);
} Which is good, because now we're not going to forget to save whether a certain thing already happened, like whether we got that almighty sword of light already. I'm certain you don't want plot events to repeat, or people to exploit a bug in your game and keep getting duplicates of a rare item.
If you're not worried about loading/saving yet, don't let my examples worry you.
Posted on 2006-06-21 19:02:33 (last edited on 2006-06-21 19:03:50)
|
rosh.r03
|
....
Posted on 2006-06-22 02:40:31
|
Gayo
|
Quote:Originally posted by rosh.r03
....
If you want to drive up your post count, do it in Castle Heck.
Posted on 2006-06-22 16:47:12
|
eltimo
|
ok, back to the topic,
I've tried adding some flags into my system vc and i have another problem *sigh*. All i put was
// Plot and miscellaneous flags.
#define FLAG_CRYSTAL_WENT_EVIL 1
// The flags container.
int flags[10000];
and it says that flags are already defined?????
Posted on 2006-06-23 11:20:29
|
mcgrue
|
If you're using sully as a base, flags.vc is already included. That's where I stored all of the flags for sully.
If you're not using the sully code, an error like "flags are already defined" means precisely that: that variable being named (in this case 'flags') has been defined in your vc code somewhere else. Do a quick search in your code for "flags", and see how many declarations turn up.
You have been using an editor that lets you search in all files in your working project directory, right?
You know what a declaration is, right?
You know not to include the quotes in the search, right?
Posted on 2006-06-23 12:47:25
|
eltimo
|
ok, back to the topic,
I've tried adding some flags into my system vc and i have another problem *sigh*. All i put was
// Plot and miscellaneous flags.
#define FLAG_CRYSTAL_WENT_EVIL 1
// The flags container.
int flags[10000];
and it says that flags are already defined?????
Posted on 2006-06-23 13:04:02
|
Overkill
|
Make sure flags isn't declared by a piece of code you're including. Use the Find tool.
Posted on 2006-06-23 13:13:09
|
eltimo
|
I've already tried that and its the onli "flag" in the script
Posted on 2006-06-23 13:34:33
|
eltimo
|
Aaaah, i've got it, it was in another file within my sysem.vc
Posted on 2006-06-23 13:36:20
|
eltimo
|
can you change the width and height of a sprite when your making it???
Posted on 2006-06-23 16:03:19
|
Overkill
|
Seems VOpenCHR hadn't quite considered the possibility someone would want to resize their entity. I guess you have to open two VOpenCHR windows, one with your sprite, and one with new blank sprite of the desired size. Then copy from the one window into the other.
(This is why I've used CHRMAK5 lately, since I can just screw around with my image file whenever I need to resize it. Takes an hour to do this sometimes though :D)
Posted on 2006-06-23 16:35:49
|
eltimo
|
My CHRMAK dusnt work so im gona hav 2 solve this usin vopenchr.
I've tried opening two windows and it works but it wont let me alter the move script????
it says F0W10 and when i change it it just goes back when i change it??
Posted on 2006-06-24 08:41:14
|
Overkill
|
Quote:Originally posted by eltimo
My CHRMAK doesn't work...
My guess is that it does, it's just you've never had to use a command-line tool before. If interested in learning how to use it: http://www.verge-rpg.com/docs/view.php?libid=5
Quote:Originally posted by eltimo
...so I'm going to have to solve this using vopenchr.
I've tried opening two windows and it works but it won't let me alter the move script. It says F0W10 and when I change it, it just goes back. when i change it?
Well, don't worry about modifying the movescript until after you've got your resized sprite. There's lots of bugs with VOpenCHR, so you'd probably have to save your resized sprite, close both windows and then open the program back up to edit the movescript.
Posted on 2006-06-24 09:18:14
|
eltimo
|
i've already tried that but im goin to try using chrmak. Is there anyway to do movescript in ure vc??
Posted on 2006-06-24 16:21:08 (last edited on 2006-06-24 16:21:57)
|
eltimo
|
One other thing. If i was to upload a demo (unlikely), how do i do it. i know its on the left, i'm not that thick but i don't understand the line reading.
Author: [unset] find author (opens new window)
should i add the file name or my name. I've tried both and neither work?????
Posted on 2006-06-24 16:35:42
|
Overkill
|
Quote:Originally posted by eltimo
I've already tried that but I'm going to try using chrmak. Is there anyway to do movescript in your vc?? Nope (although, possibly in the future as a result of the "savers" to be added). Instead, you make .mak files for CHRMAK. This is because typically you'll never need to change the directional movement scripts of a character inside your code.
Quote:Originally posted by eltimo
One other thing. If I was to upload a demo (unlikely), how do i do it? I know it's on the left, I'm not that thick, but I don't understand the line reading.
Author: [unset] find author (opens new window)
Should I add the file name or my name? I've tried both and neither work????? The author would be the person who wrote the game, by the username they go by on the forums. The name of the game is a separate field, and it wouldn't make sense to have search functionality (or any unnecessary popups) for that.
Errrr... However, it seems the author search script doesn't work as-is. But I'm sure it worked before we switched servers. Thanks for pointing that out.
Posted on 2006-06-24 17:16:36 (last edited on 2006-06-24 17:17:08)
|