BE the monster

hey guys. i was just messing around with CGE and i made this quick game - not an rpg - where you are a monster from pog (theres like 12-13 to choose from) and you go around an arena killing people that run away, ya, sounds boring, but there are diff. levels with faster and faster people and stuff. It's actually kinda fun. well, anyway, i got some problems. (now these are not absoluteley necessary cuz it's not my REAL game, but hey, it would be nice to know) Anyway, (1) I was wondering if there was a way to pull off a timer. (2) How can you make a high-scores list, and (3) I got a problem with the changing player icons. First off, is there a way to test for specific races and change their icons? I couldnt find a way so what i did is make the karma equal the race. E.G. 0 Karma=Archmage, 1=Azarath, 2=Minotaur, 3=Death Knight, etc. And the last one is Zombie. (it's like, 11 or 12 Karma I think) anyway, so I made a buttload of conditional checks for the karma, like...

Title: Conditional2:
Player has 2 Karma
If true do "Change Player Icon to Minotaur"
If not true do conditional 3
See what I mean? Well, I thought it was a handy idea, and.. well... it didnt work. This makes me mad: the player always turns out to be the stinkin ZOMBIE! argh it makes me so frustrated. The player is MOSTLY the zombie i should say... one time it was the minotaur (although i didnt choose minotaur in the race selection) and a few times it was the troll (also didnt pick troll). So you see, it's kinda annoying. Oh, one more thing, i made diff. weapons for each of the monsters so when they attacked, it made the monster's attack noise. E.G. If the player is a minotaur, he gets the Minotaur's Axe wich makes the sound "Minotaur_001" for a hit with the weapon and the sound "minotaur_002" for a miss. That doesnt work either. The weapon works, but the sounds dont. Well thanks, and sorry to bother you guys so much with my problems, I guess I'm just kinda an amateur.

------------------
I'm not laughing at you,
I'm laughing with you in
mind

Quote

Originally posted by OgreBob:
(1) I was wondering if there was a way to pull off a timer.

I suspect that it can be done with an animated stamp of some sort, though I'm not sure. A timer appears in Trinity at the shooting range, so if you're willing to wait until the Trinity sources are released, you can find out how they did it.

Quote

(2) How can you make a high-scores list,

Look at the sources for Cosmic Memory if you have them. I suspect it's done with a bunch of globals and some event scripting. A downside, though: there's no way that I know of to write the scores out to a file, except as globals within a save game. I suppose you could prompt the player to save when quitting the game, though.

Quote

(3) I got a problem with the changing player icons. First off, is there a way to test for specific races and change their icons?

Hmm, isn't that odd - there doesn't seem to be a way to directly do a conditional for Race or Job. (I've mentioned it to the beta list as a possible bug.) I haven't tried this, but a possible workaround might be to use a Change Globals action to load Race into a custom global, and then do conditional comparison against that.

Quote

**Title: Conditional2:
Player has 2 Karma
If true do "Change Player Icon to Minotaur"
If not true do conditional 3
See what I mean? Well, I thought it was a handy idea, and.. well... it didnt work. This makes me mad: the player always turns out to be the stinkin ZOMBIE! argh it makes me so frustrated. The player is MOSTLY the zombie i should say... one time it was the minotaur (although i didnt choose minotaur in the race selection) and a few times it was the troll (also didnt pick troll). So you see, it's kinda annoying. **

Hmm, that's odd. Did you double-check to make sure each conditional is correct?

Quote

Oh, one more thing, i made diff. weapons for each of the monsters so when they attacked, it made the monster's attack noise. E.G. If the player is a minotaur, he gets the Minotaur's Axe wich makes the sound "Minotaur_001" for a hit with the weapon and the sound "minotaur_002" for a miss. That doesnt work either. The weapon works, but the sounds dont.

I'm surprised no one had caught this before now. I just checked, and you're absolutely right about this. I've posted it to the beta list as a bug. Congratulations, you're now a more active bug finder than half the beta team! 🙂 😛

------------------
Who are the people most opposed to escapism? Jailors! - C.S. Lewis
I'm a heterosexual white American male - if only I were Christian too, I'd be the ultimate oppressor of all that is right and just in this world. 🙂

here are two ways of making a timer:

1. This is kind of crappy but: at some point on your map make a blocked out area (this could be in a river or blank space or whatever). When you want the timer to start, make an invisible npc that attempts to move towards a spot. When it reaches the spot, you can have an event go. If you want it to repeat, have the npc get deleted and then remake him. (You can't actually put an exact time on this until you figure out exactly how speed works)

2. This was one suggested to me awhile ago which i haven't bothered to try since i had already finished my events: Make a spell that does absolutely nothing but it has a duration time. at the end of the time trigger an event. To start the timer, just have the spell get auto-cast.

------------------
The word politics is derived from the words poly, meaning many, and tics, referring to blood sucking parasytes.

Quote

Originally posted by Glenn:
**....animation stamp.....

**

Here's what Dee had to say with help from Stark

How would you make global timer/counter?
As for a timer, There is two ways of doing this: The first one is to cast a dumb spell that does absolutely nothing but you can link what you want in its cast/remove effect event The second is use a dumb animation (consisting of white frames) and link an event to each frame (or one frame and make it loop) however, this last method will only work if you stay in the same map.

Well, by working with both methods, you can achieve some sort of timer but that's the best for now.
-Dee Brown

So a universal counter should be possible between maps by using the second method and a global variable. When a new map loads take the count, load it into a global variable, then add that number to the fresh start animation and begin the count again then save the count for the next map.
-Stark Bledfast

this can be found here:
(url="http://"http://coldroom.150m.com/CGE_Stuff/CGE_Tips.html#Q24")http://coldroom.150m...E_Tips.html#Q24(/url)

~stray

------------------
Shift Pattern Graphics at (url="http://"http://shiftprint.com")http://shiftprint.com(/url)
See CGE_Tips at:
http://coldroom.150m...f/CGE_Tips.html

actually, now that I think about it, I could probably do a timer by using a global like gb_Time and make an event over the whole map that says:

Conditional:
gb_time is equal to 60
If true do Dialouge
If not true do Change Globals

(next)
Change globals: Add 1 to gb_time

(next)
wait for 1000 milliseconds

Do you think that would work?

------------------
I'm not laughing at you,
I'm laughing with you in
mind

Quote

Originally posted by OgreBob:
Do you think that would work?

No it won't: the wait event completely freezes the game You won't be able to move at all.

Quote

Originally posted by Glenn:
I suspect that it can be done with an animated stamp of some sort, though I'm not sure. A timer appears in Trinity at the shooting range, so if you're willing to wait until the Trinity sources are released, you can find out how they did it.

One way to pull this off is by making an animation with the seconds counting down. Since the game will run at 30 fps, you can set the frame delay to 30, so it will take a second to change the second. Then you can tag an event to the 0 frame. If you can make the animation follow the screen or if the map is the size of the screen (mabe by increasing the resolution to make it bigger) it can be pulled off. You can also make an animation with transparent frames and brought up with stamp control for a general timer...(or you could still make it with numbers if you prefer.)

------------------

I really wish my C/S would arrive so this doesn't all sound like Giberish......

------------------

This is an untested method, so I don't know if it works:

event: timer
Wait 1 ms
add 1 to gb_time
check to see if gb_time equals 1000 (or whatever time you want)
if true, call the event you wanted
else call timer again

I just thought I would throw this idea out there, the spell or animation idea sounds better, but I wanted to know your thoughts on this.

------------------
And don't play dumb, you're not as good at it as I am!