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 - Colxfile

#41
At its most basic level, to shoot the terrorist in the manner you describe would only need the shooting stuff (Animate Jack firing gun, Animate terrorist falling down dead etc) into the interaction editor when you use the gun inventory object on the terrorist character. If this is the case, then player.ActiveInventory will be required.
Code: ags

// Global Script File

int is_enemy_alive = 1;

some_global_function_a(){

Ã,  Ã, if (player.ActiveInventory == iGun) {
Ã,  Ã,  Ã,  // Do stuff
Ã,  Ã,  Ã,  // Shoot enemy
Ã,  Ã,  Ã,  is_enemy_alive = 0;
Ã,  Ã, }
}

Assuming iGun is the Script-o-name of the gun in question. Also, that int [is_enemy_alive] is a variable you'll see in a moment.

As for the terrorist shooting the character, again, I can give a simple idea. If you simply have a confrontation and you had a split second or two to fire before you got killed, then you can use timers.

After the confrontation sequence has happened, you'd call SetTimer(timer number, how long it lasts). Also, in that room script, you'd have the IsTimerExpired function in the repeatedly_execute block. When the timer expired, the enemy would shoot. So:
Code: ags

function the_confrontation() {
Ã,  Ã, ...
Ã,  Ã, ...
Ã,  Ã, ...
Ã,  Ã, SetTimer(x, time)
}

function repeatedly_execute() {

Ã,  Ã, if (IsTimerExpired(x) == 1 && is_enemy_alive == 1) {
Ã,  Ã,  Ã,  // Do stuff
Ã,  Ã,  Ã,  // Shoot player
Ã,  Ã,  Ã,  ...
Ã,  Ã,  Ã,  ...
Ã,  Ã,  Ã,  // Death
Ã,  Ã,  Ã,  // Cancel next season
Ã,  Ã, }


The [is_enemy_alive] condition would be required to stop the enemy shooting you after you've killed him. You change that in the function when you manage to kill him. Needless to say, you'd need to set up a variable of that name and make sure that it starts off with a value of 1.*

But this idea is very simlistic and would most likely be used for a one-shot kill on either side. If you had more in mind a shooting-gallery-type section, or basically something other than what I have descibed that would be more complex (But perfectly do-able). I'm sure someone else will have such an idea in mind :)

EDIT: * Yeah, if the variable is declared in the global script, but needed in the room script, then you'll need to import it in the script header, and export it from the global script. See the manual for more.
#42
Definitely the first one, if you're going to be using the "%c" string format to display a character that's not A-Z or 0-9, it would be a boon to know what the character you want will be without all the guesswork / counting.
#43
Quote from: StarLite on Mon 10/04/2006 21:25:21
I know I've said that I didn't want anything to do with script but I started reading the script tutorial and I think I may be able to handle it. My question is. Can I do a combo, for instance use the Interactions and just use script for things that can't be done through the Interaction

Yeah. Just do your thing in the interaction editor, and then add one "Run Script" Interaction and do your scripting in there. You can use both the interaction editor and script editor for all your interactivity needs :)

Quote from: StarLite on Mon 10/04/2006 21:25:21like I want to have it so that when my characters talk to each other, it will be like in the game Keepsake. I'm guessing I will need script for that. I want the dialogue to be at the bottom of the screen inside a rectangle box and you hit a button when you are finished reading so it will scroll to the next text line. I think I read something about it in the manual.

I've not played that game, myself. But, if I've got this right, then I think it would be possible to script. (Though it may be tedious) If you suggesting the following:

A: blah blah blah blah blah blah blah blah blah blah blah blah blah blah
[Push the Button to continue]
B: blah blah blah blah blah ? blah !
[Push button to go on]
A: Lol!

Then it depends on what the button is. If it's a button that appears on the screen beside the text, which you click on with the mouse to advance it, then that strikes me as being very difficult to script. (Unless someone out there can prove me wrong... :))
However, if you want a specific key on the keyboard and only that key to advance speech, then there is the global variable: game.skip_speech_specific_key which you can set to a specific keycode and only that key will advance the speech. (If you set it to zero, then any key would advance it).
O'course, one of your general settings must be set to Skip Speech: Mouse+Key / Key only.


EDIT:
Just seen a screenshot of it here and it looks like your after a button on the screen that advances the text. As far as I know this would be very tricky to implement using the scripting.
#44
One last thought before I go to bed, is it worth thinking about randomising where the landing pads are? Or at least having more than one possible layout where the targets are located? Just an idea.

Incidentally, just played with the first ship. (The very slow one with bullets front and back) Got up to about mission 6 so far...
#45
Okay. It's just I just like to keep my hands on the keyboard if a game is keyboard driven.Ã,  Combined Arrows and Mouse moving the respawn point sounds fair to me :). I'm not sure if using the arrows would stop it being jumpy, but I imagine there's a way to at least slow it down.

Also, I much prefer spacebar for the fire key, myself. I think it's just what I'm used to. (I say this, my arcade game doesn't use the spacebar... :))

As for the levels... I think they were pitched about right difficulty wise. Initially, I got a little annoyed because my ship would explode in mid-air for no adequately explorer reason (It had collided with an invisible landing pad) but once I got the hang of it and got the hang of how to find them, it was much better. I admit though, I picked one ship that I liked and stuck to it. (I think it was the blood hawk, but upgraded to the Dragonfly.) Again, maybe other players would go for the other ships and stick with them, but I just chose the one ship and stayed with it. Maybe later levels could have a restricted choice of ships to force you to use a different one?

I'll have another run through later with the various ships to see how I go.
#46
I've given it a go and it looks really good so far. The background graphics are very nice (Especially the planet atmosphere one)

Just one thing that came to mind:

I found using the mouse to choose the restart point a bit troublesome. I found the movement much too sensitive: a small movement led to the screen charging to one of the corners. Also, if I'd been frantically trying to shoot don the ships that surrounded me (and subsequently failed) I'd have to move from having two hands on the keyboard, to one on the mouse. Having arrow-keys move the respawn-point would be much better imo.

Edit: I should add that I did get throught the eight levels. :)
#47
It can be done with through coding. There's a module for it and everything.

http://www.adventuregamestudio.co.uk/yabb/index.php?topic=22724.0

#48
Quote from: Glacies Akumayo on Thu 16/02/2006 01:56:11
Colxfile:Ã,  Where's your source?Ã,  ...

Oh. I'd tried to get around the 'need some kind of a module' limitation by just having most of it in a room file. Import the room into the game. Edit the room script. That was my reasoning.

Whoops!  :-[
#49
This is the best I could do:

Centipede



It's very buggy, and is very restricted in what you can do (ie you can move and shoot the moving centipede and mushrooms). But short of starting again, it's the best I can do in the time.

EDIT: The sprite folder has now been added.
#50
Yes. I should have said that these variables were being declared outside of functions in my script. Thank you. :)
#51
I'm intending to get the height and width of a sprite and store these in a couple of variables like so:

Code: ags
int sprite_width = GetGameParameter(GP_SPRITEWIDTH, mush_sprite, 0, 0);
int sprite_height = GetGameParameter(GP_SPRITEHEIGHT, 4, 0, 0);


However, the compiler doesn't like this and says "Expected integer expression after '=' ".

What am I doing wrong?
#52
There is a remote possiblility that I have an entry in the making. I may even make the deadline.

No, it's not Secret Quest. Honest. :P
#53
Your eyes don't deceive you. I am now ready to start play testing this game. I know I should be doing my maths degree. But frankly, my learning about difference equations, discounting cash-flows, compiling crosswords and my semi-lucrative poker career can wait.

It won't be an open play-test, however. I have already PM'd some people Offering their Services and will be doling out the play-test editions to a few people who are interested. Unless, of course, no-one responds. In which case, the situatiuon will be "For the love of God, someone play my game: I've spent a year coding it and I might be going insaaaaaaaaaaaane..."

Are you interested in play-testing this game
Please bear in mind that:
This is NOT an adventure game;
The graphics are 8-bit;
Would-be play-testers would need to be able to second-guess how the game is working, and devise new ways to break it (Short of corrupting the files and pressing Ctrl-Alt-Delete.
And I may say "Thank you for the interest, but I've assembled my army of play-testers already"

Still interested? Then send me a PM.

(Demo 2 is still available... Note two new screenshots in first post)
#54
Minor: On the tidbits and snippets page, there are details for how to open your .ags file by double-clicking on it. If you do that, then that game isn't bumped to the top of the 'Recent Games' dialog box if you open the editor in the conventional manner.

Also, the manual makes quite a few references to the DOS engine that should be removed.
#55
Well, I think that if you just put the AGT files in the same directory that the editor is, then just open the editor and choose 'make new game', you'll see the list of template on offer...
#56
Bump. Progress report. (Not a new demo, sorry.)

Well, the eighth and final station has been added. It just needs the respawning array and the array of colours sorting out. I also need to go back to the seventh station and colour that one in. (DONE!) In addition, resumption based on passcode has been implemented and I think it works a charm. My copy of the to-do list includes the following comment on this matter:
Quote"WHEEEEEEEEEEE!!!"
Also, you don't get quite the same 'Titty Biscuits' line you get in the demo if you don't escape the station. Instead, you get the now cliched 'Game Over' screen. And, the title screen is nicely animated.

But do not be fooled, for the finish line is still some way away - I'd say at least another 400 metres yet: I need to do lots of things. Here's the check-list so far:
To do:

ADDITIONS:
* Make the enemies appear instead of just being there when you walk in.(1)
* Respawncount for station 8.
* Pallettes for 7 and 8.

* Ending for completing the game.
FIXES:
* Make one enemy stand still and shoot fireballs. (2)
IMPROVEMENTS:
* Improve respawning.(1)
* RATIONALISE THE CODE(3)
* Ending for running out of Oxygen.
* Better Sounds
* Improve wandering.
TESTS:
* Thoroughly test resumption
* See if it can actually be completed.

1 - These two entries will probably involve much the same basis
2 - Yes, there always has to be one exception that requires it's own circumstances coding in...Ã,  ::)
3 - The global script clocks in at 1,935 lines of code as it stands. (And 3263 semicolons. If you include the room script, then that's an extra 226. They breed like rabbits.) Some of that is for line breaks and comments, so they can be expunged at the end, but I'm looking to trim it down as far as possible.

That's all the news for now. Except that I return to University for the second half the second year of my degree course, so after next week, progress and updates will grind to a halt. I will suggest a not-too-serious date of late May for it to be finished (That's exam revision time for me, and I don't like revising much...)
#57
Try changing this:
Code: ags
function GoToCharacterEx(int charidwhogoes, int charidtogo, int direction, int xoffset, int yoffset, int NPCfacesplayer, int blocking);

to this:
Code: ags
function GoToCharacterEx(int charidwhogoes, int charidtogo, int direction, int xoffset, int yoffset, int NPCfacesplayer, int blocking) {


Change that semi-colon to a curly bracket :)
#58
Hints & Tips / Re: 1213
Tue 03/01/2006 19:56:39
Go all the way back to the elevator at the start of the game (Where you met the second guard)  ;D
#59
Command and Conquer. "I've got a present for ya!" / "Time to rock and roll!"
Sonic The Hedgehog as well, I suppose.
#60
Yes, in the original you are moved into the centre of the room after using the stairs. I prefer having it that way, myself. Not just because it hapens in the original, but also because you can freely go in any direction from the room you land in without needing to extricate yourself from the corner first.
SMF spam blocked by CleanTalk