Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Kinoko

#2341
It was looking good there for a second. The game started up, and printed correctly, "first line". Then it all crashed and I got a fatal error:

An exception 0xC0000005 occured in ACWIN.EXE at EIP=0x0042270B;
program pointer is +6, ACI version 2.60.693, gtags (1,25)

It referred to this line:

  StrCopy(displayedline," ");
#2342
Now, I get undefined symbol, 'colour'
#2343
Pending...
#2344
This time I got "Unresolved import" for TypeLine when I tried to test the game.
#2345
The only ones I care about are Hitchhikers (mixed feelings! Argh! They better do a good job.), Pirates and Charlie and the Chocolate Factory (I'm feeling surprisingly optimistic about both of these, which is unlike me... it must be my love of Johnny Depp).

Though, I hope they find a REALLY sexy Carmen Sandiego. The Die Hard thing just cracks me up... I love those movies and I'm glad they haven't gone for some original plot or anything ^_^ "Terrorists get in the way of their holiday! Oh-no!"
#2346
I've implemented the script that allows action-style movement into my script and it works perfectly. My character walks when direction keys are held down with no problems.

Now, though, I'd like to be able to have the character run when I hold down the 'A' button. Basically, if I hold down 'A', and then press a direction key. I want him to run, OR if I am holding a direction key (ie walking) and while doing that, I hold down 'A', I want him to start running from the walk.

I realise you cannot change a characters speed while he is moving, so I was trying to achieve this by having him stop for a fraction of a second and then start running (a little jerkiness is a small sacrifice, I think). So, I've been mussing around with the code for awhile and I can get him to run when the 'A' button is pressed, but only after it has been let go. If I walk and then hold the A button, EGO stops until I release 'A' and then runs.

Also, if I let go of the direction button after that (stopping the character) and then hit a direction button again, he'll still be in run mode. I'm not sure exactly where I should reset his speed back to normal.

Here's the entire repeatedly execute script in my global script:
Quote
function repeatedly_execute() {
Ã,  // put anything you want to happen every game cycle here

// --- keyboard control ---
int CharId, Direction, dx, dy;
// neue Richtung ermitteln
if ((IsKeyPressed (371) > 0) || (IsKeyPressed (55) > 0) || ((IsKeyPressed (372) > 0) && (IsKeyPressed (375) > 0))) Direction = DIR_UP_LEFT;
else if ((IsKeyPressed (373) > 0) || (IsKeyPressed (57) > 0) || ((IsKeyPressed (372) > 0) && (IsKeyPressed (377) > 0))) Direction = DIR_UP_RIGHT;
else if ((IsKeyPressed (379) > 0) || (IsKeyPressed (49) > 0) || ((IsKeyPressed (380) > 0) && (IsKeyPressed (375) > 0))) Direction = DIR_DOWN_LEFT;
else if ((IsKeyPressed (381) > 0) || (IsKeyPressed (51) > 0) || ((IsKeyPressed (380) > 0) && (IsKeyPressed (377) > 0))) Direction =DIR_DOWN_RIGHT;
else if ((IsKeyPressed (372) > 0) || (IsKeyPressed (56) > 0)) Direction = DIR_UP;
else if ((IsKeyPressed (375) > 0) || (IsKeyPressed (52) > 0)) Direction = DIR_LEFT;
else if ((IsKeyPressed (376) > 0) || (IsKeyPressed (53) > 0)) Direction = DIR_STOP;
else if ((IsKeyPressed (377) > 0) || (IsKeyPressed (54) > 0)) Direction = DIR_RIGHT;
else if ((IsKeyPressed (380) > 0) || (IsKeyPressed (50) > 0)) Direction = DIR_DOWN;
else Direction = DIR_STOP;
// Vergleich mit aktueller Richtung
if (PrevDirection != Direction)
{
PrevDirection = Direction;
CharId = GetPlayerCharacter ();
if (Direction == DIR_STOP) { StopMoving (CharId); } // 5 Stop (numeric pad)
else
{
if (Direction == DIR_UP_LEFT) { dx = -DIR_DISTANCE; dy = -DIR_DISTANCE; } // 7 Home (numeric pad)
else if (Direction == DIR_UP) { dx = 0; dy = -DIR_DISTANCE; } // 8 Up arrow
else if (Direction == DIR_UP_RIGHT) { dx = DIR_DISTANCE; dy = -DIR_DISTANCE; } // 9 PgUp (numeric pad)
else if (Direction == DIR_LEFT) { dx = -DIR_DISTANCE; dy = 0; } // 4 Left arrow
else if (Direction == DIR_RIGHT) { dx = DIR_DISTANCE; dy = 0; } // 6 Right arrow
else if (Direction == DIR_DOWN_LEFT) { dx = -DIR_DISTANCE; dy = DIR_DISTANCE; } // 1 End (numeric pad)
else if (Direction == DIR_DOWN) { dx = 0; dy = DIR_DISTANCE; } // 2 Down arrow
else if (Direction == DIR_DOWN_RIGHT) { dx = DIR_DISTANCE; dy = DIR_DISTANCE; } // 3 PgDn (numeric pad)
MoveCharacterStraight (CharId, character [CharId].x + dx, character [CharId].y + dy);
}
}

Ã,  if (IsKeyPressed(65)==1) { //RUNNING - 'A' button held down
Ã,  Ã, 
Ã,  Ã,  Ã, if (Direction == DIR_UP_LEFT) {
Ã,  Ã,  Ã, StopMoving (EGO);
Ã,  Ã,  Ã, SetCharacterSpeed (EGO, 10);
Ã,  Ã,  Ã, dx = -DIR_DISTANCE; dy = -DIR_DISTANCE; }
Ã,  Ã, 
Ã,  Ã,  Ã, else if (Direction == DIR_UP) {
Ã,  Ã,  Ã, StopMoving (EGO);
Ã,  Ã,  Ã, SetCharacterSpeed (EGO, 10);
Ã,  Ã,  Ã, dx = 0; dy = -DIR_DISTANCE; } // 8 Up arrow
Ã,  Ã,  Ã, 
Ã,  Ã,  Ã, else if (Direction == DIR_UP_RIGHT) {
Ã,  Ã,  Ã, StopMoving (EGO);
Ã,  Ã,  Ã, SetCharacterSpeed (EGO, 10);
Ã,  Ã,  Ã, dx = DIR_DISTANCE; dy = -DIR_DISTANCE; } // 9 PgUp (numeric pad)
Ã,  Ã,  Ã, 
Ã,  Ã,  Ã, else if (Direction == DIR_LEFT) {
Ã,  Ã,  Ã, StopMoving (EGO);
Ã,  Ã,  Ã, SetCharacterSpeed (EGO, 10);
Ã,  Ã,  Ã, dx = -DIR_DISTANCE; dy = 0; } // 4 Left arrow
Ã,  Ã,  Ã, 
Ã,  Ã,  Ã, else if (Direction == DIR_RIGHT) {
Ã,  Ã,  Ã, StopMoving (EGO);
Ã,  Ã,  Ã, SetCharacterSpeed (EGO, 10);
Ã,  Ã,  Ã, dx = DIR_DISTANCE; dy = 0; } // 6 Right arrow
Ã,  Ã,  Ã, 
Ã,  Ã,  Ã, else if (Direction == DIR_DOWN_LEFT) {
Ã,  Ã,  Ã, StopMoving (EGO);
Ã,  Ã,  Ã, SetCharacterSpeed (EGO, 10);
Ã,  Ã,  Ã, dx = -DIR_DISTANCE; dy = DIR_DISTANCE; } // 1 End (numeric pad)
Ã,  Ã,  Ã, 
Ã,  Ã,  Ã, else if (Direction == DIR_DOWN) {
Ã,  Ã,  Ã, StopMoving (EGO);
Ã,  Ã,  Ã, SetCharacterSpeed (EGO, 10);
Ã,  Ã,  Ã, dx = 0; dy = DIR_DISTANCE; } // 2 Down arrow
Ã,  Ã,  Ã, 
Ã,  Ã,  Ã, else if (Direction == DIR_DOWN_RIGHT) {
Ã,  Ã,  Ã, StopMoving (EGO);
Ã,  Ã,  Ã, SetCharacterSpeed (EGO, 10);
Ã,  Ã,  Ã, dx = DIR_DISTANCE; dy = DIR_DISTANCE; } // 3 PgDn (numeric pad)
Ã,  Ã,  Ã, 
Ã,  Ã,  Ã, MoveCharacterStraight (EGO, character [EGO].x + dx, character [EGO].y + dy);
Ã,  Ã,  Ã, }
Ã,  Ã, 
}

I'm sure it's as messy as hell but I've been steadily making progress up until now. I can't really think of how to get around this though I'm sure it's obvious. Can anyone help?
#2347
It happens to me on one of my computers. I've learnt to live with it but the one thing I've noticed most people with this problem have in common is the GeForce video card (as do I on the computer this happens on). Why and if that's even the problem, I have NO idea.
#2348
Would this also completely disable it's use?
#2349
*groan* Why do these things always escape me? Thanks for that ^_^

I have to go to bed now before my head melts off but I'll try this in the morning. I suspect I'll have to do a bit of customisation in order to make this a function I can use often and not just for credits.

EDIT: OK, I've had a look at the script, and inserted it into a game but I get an error message that 'line1' is an undefined token.
EDIT2: Nope, fixed that with some 'int' lines. Though now I'm getting 'undefined symbol' for TypeLine.
#2350
I'd like to know if someone could give me an idea of how to create a feature in an RPG I'm hoping to make with AGS. Basically, I'd like to be able to call a function with certain pieces of text that makes the text appear letter by letter until it has written the whole string out.

If anyone knows a program called 'ika', it uses a code based on a language called Python, which I'm very, very new to. I'll just show you a section in their tutorials that talks about how this program deals with this particular function.


QuoteScrolling
Looking at the pages isn't very interesting when it instantly all appears.. what we would like is for the text to scroll by character by character. Again, this isn't hard to do. We'll have a list to store the scroll positions of each line, and a variable to store which line is currently scrolling. Add this in between the two while loops:

Ã,  Ã,  Ã,  Ã, scroll = [0, 0, 0, 0]
Ã,  Ã,  Ã,  Ã, curline = 0

We put it here because we want these values to reset every time we reach a new page. Next, we need the part that actually does the work, which we add at the top of the for loop, before we Print:

Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, if curline == i:
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  scroll[curline] += 1
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  if scroll[curline] == len(line): curline += 1

This says if we're looking at the currently scrolling line, increment its scroll position, and look at the next line once it's reached the end of the current one. Pretty simple. :)

Finally, a simple modification so that we print just the part of the line that we want:

Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, font.Print(15, ika.Video.yres-70+15*i, line[:scroll])

The line[:scroll] part returns the string from the beginning of the line, to the current scroll position. As you can see, slicing is really coming in handy here. :)

Now if you run it, depending on your machine, it will either run way too fast, or too slow, or maybe just right depending on your framerate. This isn't good - we want it to scroll the same speed no matter what the framerate is.

Fortunately, it's again easy to modify. Insert this line just after curline = 0:

Ã,  Ã,  Ã,  Ã, time = ika.GetTime()

This will store the time when we started the loop. Now, inside the for loop, we want this:

Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã, if curline == i and ika.GetTime() - time >= 2:
Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  time = ika.GetTime()

We added a part to the for loop that ensures at least 2 ticks go by before it scrolls to the next character. You can play with the number a little bit if you think it's too fast or too slow, although because ika only uses 100 ticks per second, the accuracy isn't as great as it could be.

The entire article can be found here: http://ika.sourceforge.net/articles.php?view=10


Obviously a lot of things in there are very specific to this particular code but I just put it there in case it gave anyone any ideas. I've had a bit of a think myself but I'm just -not- at the scripting level where I can do this without help.
#2351
If I wanted to make a game based solely on keyboard input with no mouse cursor, would the best way to achieve this be to set the cursor mode to 'wait' and give it a transparent graphic?
#2352
Good luck with that, it's nice to know someone else is trying to expand AGS' use too ^_^ Not really what I was after though...
#2353
Adventure Related Talk & Chat / RPGs with AGS
Tue 15/06/2004 16:57:12
All the various RPG development programs out there have annoyed me and don't really seem too good. I haven't seen one so far that seems to have produced a decent (as far as I'm concerned) RPG and most are either too complicated for me to be bothered learning or are too simple and don't allow enough customisation. I found myself saying over and over again, "Why can't there be an AGS in the RPG world?"

So, I'm thinking about whether it would be possible to create a reasonably simple and yet nice looking RPG with AGS. Most things seem quite possible, even if the 'how' would be slightly more difficult than with a proper RPG game maker. I think that even with a few things like that, the ease of use and customisation of AGS would make up for it.

What I wanted some opinions on, since I've only made one game so far and I'm not QUITE yet a scripting genius, are whether people think a few things would indeed be possible with AGS with some creative scripting. I don't expect people to come up with the scripts for me, but just a little opinion on whether you guys think this would be feasable.

The sort of RPG I'm after is similar to Illusion of Gaia or something like that. Not tile-based (so, free-moving which suits AGS fine) and with a real time battle system with only one character (so no turn based fighting or anything - just like normal slash and hack action with HP/EXP etc thrown in for good measure).

Some things I'd like opinions on (possible or not?) are:
-Name input (though not with keyboard, using arrow keys to choose characters)
-Dialogue in boxes appearing letter by letter.
-Jumping/pushing/running with different button presses.
-A 'stopping' animation after the player stops running (like skidding)
-Random movement of NPCs within certain limits
-A menu screen showing items/stats/etc.
-Random (within certain limits) numbers for amount of damage done to enemies etc.
-Lists and the ability to highlight items in them

That's just off the top of my head, I don't think I need to go through every little thing I may need. Those are the basics.
#2354
General Discussion / Re: RPG style games
Tue 15/06/2004 12:19:15
Hmm, GM and RPG Toolkit seem like okay programs from what I've seen so far but I'm after something that will allow me to make a non-tile based RPG. Something more along the lines of Illusion of Gaia, Secret of Mana, Terranigma... etc, rather than Final Fantasy-ish (as much as I love games like that).

Are there any programs that'd be good for that? Or shall I just sit down and think about how to use AGS for this? ^_^
#2355
General Discussion / Re: RPG style games
Tue 15/06/2004 07:12:32
Thanks for that.

Hrrm, well, I downloaded it and had a fiddle around. It's a neat little package but I'm not so confident it'll be useful in making a non-tile based RPG (at least a decent one). I also tried ika but the executable won't execute so for the moment, that's a dead loss.

I'll keep soldiering on! ^_^
#2356
General Discussion / Re: RPG style games
Tue 15/06/2004 02:34:21
Does Gamemaker have a webpage or something?
#2357
Roughly:
"Then who the hell keeps order on the island?"
"Then who eats the donuts and exerts brutality over the homeless?"
"Please stop! I only just bought this coat!"
"If you don't want me to get angry, put me down right now." (lit. "If you don't want to meet painful eyes...")

"I'm thinking of chartering a ship and heading over to another island."

^_^
#2358
Wow @_@ That's harsh man. What was wrong with him??
#2359
General Discussion / Re: GCSEs, Hell on earth
Wed 09/06/2004 14:19:49
I don't really know what a GSCE is (final exams, right?) but you really, like others have said, have to put yourself in a position where you can't be disturbed. I mean, really, study skills are something you should already have before you get to exams :P but that's ideally.

Secondly, and very importantly, don't get caught up in thinking about how to make a great study environment. You just have to do it, and you have to tell yourself honestly not to make excuses, which is the hardest thing if you're like me.

Thirdly, whatever the subject is, make good notes. Read the material, bit by bit if you have to, learn it briefly in your head (just get a feel for it) and then from your thoughts, write it out again (unless it's maths, in which case LEARN IT EXACTLY! :P). Make -neat-, and -brief- notes. (Though not shorthand, don't go TOO brief, just get down what you need)

Lastly, take roughly a 45 minute break every couple of hours. A teacher told me that once and I swear, it worked wonders. It's just enough to clear your head and stop you from overthinking or going insane.

All this is coming from someone who did VERY little study for her highschool exams and passed them all, but my exams weren't too hard and I was pretty darn good at faking it  by that stage. I recommend learning whatever the hell you can just to get as many marks as you can so all the stuff you forget doesn't fail you ^_^
#2360
General Discussion / Re: RPG style games
Wed 09/06/2004 14:07:37
(Sorry to drag a relitively old thread up again but...)

Could someone post the link to this 'ika'? I really want to take a look at creating an RPG but I'm just not sure which program to go with. There doesn't seem to be an 'AGS' equivalent in the RPG world... pity.
SMF spam blocked by CleanTalk