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

Topics - subspark

#61
Advanced Technical Forum / DefineButton Pushed
Sun 25/03/2007 04:57:56
I'm making an updated LEC Type interface for AGS 2.7/2.8 Alpha 4 however my buttons include a pushed image rather than just a mouse off and mouse over state. So three states al up. The problem arisies when trying to code such a function. For example:

Code: ags
function DefineButton(int mode, int button, int normalbuttonpic, int overbuttonpic int pushedbuttonpic){
  //Define the buttons for a template mode. Call it in game_start for each mode to
  //set them all up.
  Tmode[mode].button=button;
  Tmode[mode].pushedbutton=pushedbuttonpic;
  Tmode[mode].highlightedbutton=overbuttonpic;
  Tmode[mode].normalbutton=normalbuttonpic;
}


...returns the error:
PE02: Parse error at 'int'.

I can't figure out the right way to code it. Any ideas?
#62
My game is constantly in need of new variables. But every once in a while a global variable is no longer needed and becomes obsolete to the function of the game. The clutter just keeps building up and it's particuarly distressing when trying to track every possible option avaliable to the player and remove bugs or conflicts. I can't make head or tails of it anymore.

I believe the deletion of global and room variables is just as important as creating them.

Cheers,
Paul W.
#63
I've scripted cEgo to say "<Sigh!> It's so peacefull here."

Whenever this runs in-game the <Sigh!> is turned into éSigh!>
I've looked through the manual and browsed through and searched the forums but there is no explination as to why <S seems to be read as an acute accent 'e'.

It's exactly the way classic LucasArts Adventure games used to indicate a non present sound or action. Always between a <>.
For example: <THUD!>
#64
I think room masks 'walk-behinds' could be greatly improved in the following ways:

* Ability to import 24bit Bitmap into mask editor.
* Colors are picked up and automatically assigned baselines and induvidual channels.
* Mask is premultiplied so that the black is transparent with no black halo or artifacts.

For example:


Note: For some reason masks currently need to have a vertical resolution identical to the game resolution.
For games with the LucasArts GUI or any GUI for that matter the room graphics may not extend to the bottom of the screen.

Such restrictions increase file size and and force unessicary resolutions onto masks beyond that of their graphical counterpart.

I beleive that with this technique we are not just killing two birds with one stone; it's a bird massacare and a life saver for those finnecky artists like myself who take pride in their pixel perfect walk-behinds.

Cheers.
#65
It would be rather nice if AGS, with all of those fantastic templates for beginners and avid game developers, could look for .agt files in a Template Subfolder in the AGS root directory.
The same goes for Plugins. Theres nothing like a spring clean especially when dealing with hundreds and hundreds of files.

Cheers!
#66
Here we go again! Sigh.

Here is the error I am getting now that I have upgraded to Release Candidate 2.

Error (line 631): Type missmatch: cannot convert 'const string' to 'string'

This section of my Global script is pretty self explanitory. Its from the MI2 SCUMM GUI template released for AGS 2.7

Code: ags
////////////////////// MODES SETUP ///////////////////////
//////////////////////////////////////////////////////////
//Normal modes:		MODE	"name"	 	AGS	Extension	
//						cursor
//						mode
Ã,  DefineMode(		WALK,		"Walk to",	9,	0);//Line 631. The template uses AGS mode 9 for walk modes, instead of 0.
Ã,  DefineMode(		LOOK,		"Look at",	1,	'l');
Ã,  DefineMode(		TALK,		"Talk to",	3,	't');
Ã,  DefineMode(		PICKUP,	"Pick up",	5,	'p');
Ã,  DefineMode(		OPEN,		"Open",			8,	'o');
Ã,  DefineMode(		CLOSE,	"Close",		8,	'c');
Ã,  DefineMode(		PUSH,		"Push",			8,	's');
Ã,  DefineMode(		PULL,		"Pull",			8,	'y');

//Inventory modes:	MODE	"name"	 	Prepo-	Only	Can	Extension
//						sition	inv.	interact
//								w/ inv
Ã,  DefineInvMode(	USE,	"Use",		"with",	0,	1,	'u');
Ã,  DefineInvMode(	GIVE,	"Give",		"to",		1,	0,	'g');

//*Only inv: 	Means that you can only use that mode followed by an inventory item:
//Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  	USE has 0, because you can USE a hotspot also. However, you can't
//Ã,  Ã,  Ã,  Ã,  Ã,  Ã,  	GIVE a hotspot, you must GIVE an inv. item you already have, therefore
//							GIVE has 1.
//*Can interact	USE has 1, because you could have an inventory item like the 
//Ã,  Ã,  with inv:	"navigator's head" in Monkey Island 1, on which if you click 'USE item'
//		then the item performs some action, instead of putting 'USE item WITH'
//		and waiting for the player to select someting to USE the item WITH.
//		An interaction like "GIVE item" on its own, doesn't make sense, 
//		(because you must GIVE something _TO someone_) so GIVE has 0.

// the button sprites probably deppend on the language being used 	
Ã,  if (Translation("default")){ // if no translation file is being used
//			mode	button	normal	highlighted
//				number	sprite	sprite
Ã,  Ã,  DefineButton(	GIVE,		0,	13,	22); 
Ã,  Ã,  DefineButton(	PICKUP,	1,	14,	23); 
Ã,  Ã,  DefineButton(	USE,		2,	15,	24);
Ã,  Ã,  DefineButton(	OPEN,		3,	16,	25);
Ã,  Ã,  DefineButton(	LOOK,		4,	17,	26);
Ã,  Ã,  DefineButton(	PUSH,		5,	18,	27);
Ã,  Ã,  DefineButton(	CLOSE,	6,	19,	28);
Ã,  Ã,  DefineButton(	TALK,		7,	20,	29);
Ã,  Ã,  DefineButton(	PULL,		8,	21,	30);
Ã,  }
//////////////////////////////////////////////////////////


I hope I don't have to rewrite the majority of the game code.

Darn.

What do you guys think? Any Ideas why it's suddenly giving me hiccups? Ã, :o
#67
Everytime I make the EGO do a certain number of things like:
Code: ags
character[EGO].Walk(150,  102);
	character[EGO].FaceLocation(150, 0);
	gui[1].Visible = false;
	character[EGO].Say("Hmm. I think I'll open the blinds on the other side.");
	character[EGO].Walk(150,  108);
	character[EGO].Walk(215,  102);
	character[EGO].FaceLocation(215, 0);
	SetCharacterView(EGO, 6);
	AnimateCharacterEx(EGO, 0, 0, 0, 90, 1);
	SetBackgroundFrame(1);
	ReleaseCharacterView(EGO);
	Wait(10);
	character[EGO].Say("What a goregous view!");
	SetGraphicalVariable("Blinds Open",  1);
	gui[1].Visible = true;


The player character skips actions and in a flash he's done. He appears to have never waited for his last action to complete. Does my code need more wait(X)'s or something or is my computer just mega fast?

Cheers in advance.
#68
Critics' Lounge / Backgrounds by Subspark
Wed 03/09/2003 10:05:49
Here are some backgrounds I did 2 years ago with photoshop. Two are tests for a game I never got around to making, and the other is a remake of Zak McKraken 's boss's office. This one got me into the Zak McKraken 2 team. I left though for private reasons.  :-X






The images contained in this message are copyrighted by Paul Wilkinson...

Enjoy...
Peace...
The whole brother thing,
Sparky...
#69
Critics' Lounge / Game Midis by Subspark
Wed 03/09/2003 09:59:37
Hi fellas, I did these a long while ago bout 2 years. There are a couple of new ones. There are many different styles of music including a monkey island map midi remake. (i did it from the memory of how the map music sounded after not playing monkey island since 1993)

The midi (Wilko's Concerto) "do not be fooled" is completely mine. I tried a 17th century style and came up with this midi.

All content contained in the archive is copyright of Paul Wilkinson (yes my REAL name)

If you wish to use it somewhere then I must be told otherwise you could be prosecuted.

I had alot of phun making these tunes and i plan to do more in the future...
Also anyone with a good sound card will appreciate them more...:)
Download here:
http://blue-rush.tripod.com/sparx_midis.zip

Note: you'll have to copy the link coz tripod don't support my linking of files.

cheers to all,
sparky...
#70
I am making a door where...ahhrgh okay youve probably all heard of my door by now but I need it so that when the door is closed you can't walk past it. The walk paths go past the door and outside where you can't see ego but the only way ego can walk in that walk path (color green i think) is when you click on the door when it's open and the script tells ego to walk outside then the room changes.

In an ideal world this would work except when the door is closed ego can still walk outside in the "leaving room" region of the walk path.

I was pondering and thought of an old trick LucasArts used with SCUMM. They turned off walk regions depending on what goes on in a room. Like most of the lucasarts adventure games, most of the doors that you can open, when clicked on the ego walks outside of it instead of the classic straight room change kind of like myst when you click a door except with a little character in the doorway that does nothing.

Its rather frustrating but alot of AGS games haven't gone to these lengths to make the environment look big by simple techniques such as having the ego walk outside a door when clicked on. Makes you feel you actually did click "walk to door" or "walk to outside"

I'd rather not use collision detection  :o

Could this be a possible implementation in the near future? Sounds feasable, U?
#71
Ive implemented the following code into my Global Script:

function FaceDirection(int charid, string direction) {
 // script for ego to face a direction
if (StrComp(direction,"down")) {
FaceLocation(charid,character[charid].x,character[charid].y+10);
}
if (StrComp(direction,"front")) {
FaceLocation(charid,character[charid].x,character[charid].y-10);
}
if (StrComp(direction,"left")) {
FaceLocation(charid,character[charid].x+10,character[charid].y);
}
if (StrComp(direction,"right")) {
FaceLocation(charid,character[charid].x-10,character[charid].y);
}
}

but when i call FaceDirection (EGO, left);

i get a compile error such as undefined symbol "left"

any ideas?
#72
I am making a room where if ego opens the door, light hits the room in certain areas around the door. I have used a closed door sprite and made it an object so that when the character clicks open on the object, the object is hidden and the background is revealed eg the door in its opened state with the light hitting the floor.

My problem is when you set walk behind areas. They effect my door closed object and some of the light from the door's opened state is showing. Is this a bug with AGS 2.56a? Does the walk behind areas normally effect objects?

I can't load any screenshots coz my website is on my comp oversees.  :'(

Does anyone have the slightest idea whats going on here?
#73
I am trying to do a room where if you click open door on a door that is open then ego says "It's already open!" for example.
Vice versa with close.

Im not sure but I figure there are ways to do this without an "and" implementation into statements but why not, it'll allow more flexability.

Note: I have set as you would a flag for the door so that when it is closed you cant walk to another room or through it for that matter. Therefore when it's open, you can click on the graphic (revealed background) and walk to the corresponding room.

My example code:

 // script for hotspot4: Any click on hotspot
if (UsedMode("walk to")) & (GetGlobalInt(7)==1) {
Wait(1);
}

if (UsedMode("walk to")) & (GetGlobalInt(7)==0) {
   NewRoomEx(6, 150, 80);
}

if (UsedMode("open")) & (GetGlobalInt(7)==0) { // Using the LucasArts GUI Template, if I click on the door with the open command selected AND if the door flag has been set to 0 then I wont walk through it as normal instead ego will say he's already opened it, as below!
   DisplaySpeech (EGO , "It's already open!");
}
#74
I want to set a flag while the player chooses a dialog option.
I need to do this through the dialog script.

Heres my code:

Character: Wizard: Interactions: Talk to: Run Script:


 // script for character1: Talk to character
MoveCharacter (EGO, 170, 130);
while (character[EGO].walking) Wait (1); //Waits until the character has arrived to the location
FaceCharacter(EGO,WIZ);

//When I want to put anything before the dialog choices, I usually put them right here.

if (GetGlobalInt(8)==1) {
 // code here

DisplaySpeech (0,"Excuse me...");
DisplaySpeech (2,"Anything more?");
RunDialog (5); //Starts the programmed dialog number 0. (topic 0 in the 'dialogs' tab)
}
else {
DisplaySpeech (0,"Excuse me...");
DisplaySpeech (2,"Yes?");
RunDialog (1); //Starts the programmed dialog number 0. (topic 0 in the 'dialogs' tab)
}


My dialog script won't except SetGlobalInt
How can i achieve setting some kind of flag in the dialog script that i can call/get in a character's interaction's talk to script?
#75
Hi everyone. It's been quite a while since I've spoken on these forums. I need some help with variables. I am trying to make my character (ego) speak to another character but once at a certain point in the dialog script it triggers a value that makes the next time I click talk to on the character he says something different and it loads a different topic.

My current script:

// dialog script file
@S  // dialog startup entry point
return
@1  // option 1
wiz: You must seek Nara in the woodlands of Keiyma.
wiz: She knows of a secret entrance that will take you to the very core of the keep.
ego: Can't you just tell me? You know all remember!
wiz: You are best to learn of this yourself. Nara will be of most help to you.
wiz: I know much, but not all.
(Wizard Talked = 1) // this is my problem
goto-dialog 5
return
@2  // option 2
wiz: That would be wise.
stop


Note dialog 5 is the topic that the variable value sets as the first when you talk to the wizard a second time.
SMF spam blocked by CleanTalk