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 - Reno Caspain

#1
Thanks monkey_5_6, that fixed it! Next problem is again the "cannot convert const string to string" on the line 145.

/**/function MouseLocationName(const string buffer){ //oli function
/**/  //gets the name of what is under the cursor
/**/ int invitem;
/**/ invitem=GetInvAt(mouse.x,mouse.y);
/*(line 145)*/ if (invitem>=0) GetInvName(invitem,buffer); // if its a inv item
/**/ else GetLocationName(mouse.x,mouse.y,buffer);
/**/ return buffer;
/**/}

These problems ought to start repeating themselves at some point, but until then, what seems to be the problem this time?
#2
I modified the script like this:

/**/function RemoveExtension(string location){ // originally string
/**/  //removes the extension of a string 
/**/  int length=StrLen(location);
/**/  if (Extension(location)!=0) StrSetCharAt(location,length-2,0);
/*(this is line 126*/  return location;

That seemed to fix the problem with line 125, but now I get the error "cannot convert string to int" from line 126.

This is indeed an old proskritos template, but I have already made 37 rooms worth of game on it so I'd like to avoid rewriting majority of my code, if possible. Or is there some way to translate the game to the new template?
#3
Advanced Technical Forum / upgrading to 2.71
Tue 01/08/2006 20:39:54
I'm upgrading my old game project to 2.71, and have changed string variables to const string in the main script and script header. However, I still get the same error in the following piece of script.

Error line 125, cannot convert const string to string

/**/function RemoveExtension(const string location){
/**/  //removes the extension of a string 
/**/  int length=StrLen(location);
/* (This is the line 125)*/  if (Extension(location)!=0) StrSetCharAt(location,length-2,0);
/**/  return location;

Any ideas how to fix this?
#4
I'm making a VGA game, and I've found Deluxe Paint to be superior for such graphics. At least version 2.0 doesn't support SVGA, but otherwise I recommend it.
#5
Advanced Technical Forum / Re:Wiring puzzle
Fri 05/03/2004 11:34:25
Is there a way to limit the on_mouse_click to certain room so it won't be scrolled through in every room? Also, I'm using Proskritos template so I still need to use the global on_mouse_click too.

Another problem is now that when the first end of wire is connected, the cursor mode turns into Walk To-mode, even when player character is hidden in the room.

I've tried SetActiveInv(17) (setting active inventory to end of the wire) and SetCursorMode(4) (set cursor mode to use inventory), but it still stays on walk to mode.

Oh, and the ClaimEvent-function cannot be found, but that might be because I use version 2.56d (if I remember it correctly).
#6
Advanced Technical Forum / Wiring puzzle
Wed 03/03/2004 06:32:04
I'm making a puzzle with 10 poles and couple of wires, where the player has to connect right poles together. Here's the code this far:

 // script for hotspot2: Use inventory on hotspot
LoseInventory(16); //wire
Display("Now where should I connect the other end?");
AddInventory(17); Ã, Ã, Ã, //end of wire object
SetActiveInventory(17);Ã, Ã, Ã, //Selects the end of the wire.
DisableRightClick(); Ã, Ã, Ã, //Keeps player from avoiding connecting the other end of the wire.
GUIOff(1);Ã, Ã, Ã, Ã, Ã, Ã, //same as above
connected=2; Ã, Ã, Ã, Ã, Ã, Ã, //Saves the hotspot number the previous end of the wire was connected to.

Now I'd need to check what hotspot the player has clicked, compare it with the int connected, and if right poles are connected, turn on the object with the wire between poles.

Because there are 15 hotspots and 6 objects on the screen, making all possible checks individually is out of the question.
#7
You could put the run-script command in the dialog script, for example:

(in dialog you want to run the animation in)

run-script 1 //This runs the script 1 from dialog_request function in main script


(in main script)

function dialog_request (int xvalue)
{
if (xvalue==1)
  {
  if (character[character number here].inv[inventory item number]==1) //checks whether the character has the item
     {
      AnimateCharacter(parameters here); //runs the animation
     }
  }
}

In case you need the game to wait until the animation ends, you could use the AnimateCharacterEx function instead of AnimateCharacter.

#8
Beginners' Technical Questions / Re:Live chat
Wed 21/01/2004 13:32:47
Here's the irc room for AGS:

http://www.agsforums.com/acirc.htm

But in case of technical questions, this forum most often gets answers within 1 hour.
#9
If it's half the size, you've most likely imported the background in hi-res, while you're importing the mask in low-res. It should ask which you want when you're importing masks or backgrounds to the game.
#10
You can make only one mask. For other walk behinds you must paint the walk behinds on the same mask, all with different colours.
#11
Beginners' Technical Questions / Re:Plugins.
Mon 19/01/2004 13:00:11
Thanks scorpiorus! Now I'll just have to find out how to use it, but the demo I'm currently finishing doesn't need it. (Will be ready as soon as I get the credits running.)
#12
Beginners' Technical Questions / Re:Plugins.
Sun 18/01/2004 13:37:44
That's exactly the link I tried, still goes to wrong site.

Haven't yet gotten reply to ScrollCredit question from the other links topic, but I'll wait a bit longer.
#13
How does the ScrollCredit function work? I've tried copying it's name from the readme, but it still gives Unidentified Token error. Otherwise plugin works, because it finds the SetCredit function.
#14
Beginners' Technical Questions / Plugins.
Sat 17/01/2004 01:16:55
The AgsCrediz plugin doesn't seem to fidn the ScrollCredit function. What is the right way to make scrolling credits then?

Also, is the flashlight plugin available somewhere? The link goes to a german site, but at least with my skills in germany I can't find the file to dowload.
#15
If you want different answers from same clicks, you need to runa script. It should look like this:

(in room script, outside any functions)

int answer;

(in interaction you want the answers at)

if (answer==0)
{
[insert your answer's script here]
answer++
}
if (answer==1)
{
[second answer here]
answer++;
}

and in the final answer replace the answer++ with answer=0 if you want to diaplay the fisrt answer again after the last one.

And other questions:

1. You can make it by selecting Hide player character in every room. That way the player character wont be shown in any screens.

2. I'm not sure, but I haven't figured out how to.

3. I think the easiest way to make shooting is to make a bullet character move from shooter to the target with MoveCharacterDirect command. To find out whether or not the bullet hit the target, use the AreCharactersColliding command, and make the damage code there. For example:

enemyname=enemyname-damage;
if (enemyname<0)
{
[dying code here]
}

I hope you're familiar with scripting, this seems to need a lot of it.
#16
According to my experiences, it loses quality. Single color areas tend to get dots of different shade on them, and colors are a bit off.
#17
What code do I use to start the idle animation before fadeing?
#18
I have an idle view of a character sitting, with delay set to zero so she should be sitting when the player arrives to the screen. When talked to, she stands up, and sits down again after dialog.

Currently, she stands when the player enters screen, and sits down only after being talked to. What would be the best way to make her start idle animation before the player enters screen?
#19
The normal C style works too. So in a message you can use it like this:

display("The variable is %d",variablename);

Where %d indicates where the variable listed later is displayed.
#20
Beginners' Technical Questions / Re:Question
Thu 27/11/2003 07:53:33
There might be easier way to do it, but at least this works.. Run a script under room interaction Player Enters Room. Script would be something like this:

SetObjectView(NUMBER OF OBJECT,NUMBER OF VIEW);

So, for example the code on setting view 4 to object 2 is

SetObjectView(2,4);
SMF spam blocked by CleanTalk