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 - Dudeman Thingface

#1
I've an NPC in a room, and none of the interactions I've set are working.
I've got this in the global script:

function cReceptionist_Interact()
{
  cSalvComp.Think ("I don't he'd help me if I beat him.");
}

function cReceptionist_Look()
{
  Wait (80);
  cSalvComp.Think ("That's the receptionist.");
}

function cReceptionist_Talk()
{
  cSalvComp.Walk (326, 319);
  dSR1.Start ();
}

And none of them are working. I don't know why. I set them through the action menu (the one with the light bolt).
I even copied and pasted a copy of these functions into the room in which cReceptionist resides.

I looked through the manual, I searched the forums and I've looked through the wiki and found nothing. I assume I've made some sort of fatal error that nobody else makes.
Does anyone know how to fix this?
#2
I'm attempting to make hotspots whose names appear in the style of COMI; that is, there is one location (usually bottom center of the screen) which the names for hotspots/items etc. appear when the mouse rolls over them.

I've been looking in the manual and searching the forums but I lack the technical experience with AGS to fully comprehend how to script what I want. I do, but I don't know what to do, allow me to explain;

I understand (or, at the very least, am aware) that I will need to use these commands, or the concept of these commands:

1) String Label.Text;

Gets/sets the text displayed in the specified label. This allows you to change the text during the game, for example to create a Lucasarts-style status line.

Example:

lblStatus.Text = Game.GetLocationName(mouse.x, mouse.y);
will display the name of the location the cursor is over on label 'lblStatus'

2) Interface text

You can easily display static text on interfaces. For example, the Sierra-style interface displays the score in the status bar.
To add text to a GUI, you add a label. Click the "Add label" button, then drag out a rectangle like you did when adding a button. You can change the text displayed in the label by editing the "Text" property. Notice that the text automatically wraps around to fit inside the rectangle you drew.
As well as typing normal text into the label, you can add some special markers which allow the text to change during the game. The following tokens will be replaced with the relevant values in the game:

@GAMENAME@ The game's name, specified on the Game Settings pane
@OVERHOTSPOT@ Name of the hotspot which the cursor is over
@SCORE@ The player's current score (number only)
@SCORETEXT@ The text "Score: X of Y" with the relevant numbers filled in.

@TOTALSCORE@ The maximum possible score, specified on the Game Settings pane
Example: You have @SCORE@ out of @TOTALSCORE@ possible points.

The Properties window also allows you to align the text to the left, right, or centre, as well as change its font and colour.

I may understand the concept of these ideas, but I don't their implementation. I don't know where to put them (Global or room script) or how to make it work (namely, which function will make it go when I want it to). In particular, for number 2, I have no idea where to put @OVERHOTSPOT@, or refer back to the interface text.

I thought that maybe the Description (http://www.americangirlscouts.org/agswiki/Description_Module) module may help. Unfortunantly, once looking at the documentation for it, I came to the same problem of where (Global or room) and how (function use).

Although I personally believe I've exhausted all other ways of trying to fix this myself, if there is a tutorial that explains how to do this for me, or there a few manual topics that will clear it up completley, please direct me to them. I don't want you to waste your time repeating something I could've very easily found in the manual.

Otherwise, please help.
SMF spam blocked by CleanTalk