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

#1
Hey Khris,

That's a fair enough assessment.

I will be going with both options, and hopefully come out the end of it with the feature I want.

Thanks for you advice again

Paddy


#2
Thanks Khris.

I've implemented those steps and they appear to be working nicely.

Here is some Global script to call up the Gui and change the pages by toggling labels on and off via a next page button.

Code: ags

//Open NoteBook Gui Commands
function iNoteBook_Look()
{
  player.Say("Let's take a look..");
  gNotebookIndex.Visible = true;
    
}

//Index Button Handlers

function BLocations_OnClick(GUIControl *control, MouseButton button)
{
  gNotebookLocations.Visible = true;
  LLocations2.Visible = false;
  gNotebookIndex.Visible = false;
}



//Return To Index From Locations
function BReturnToIndex_OnClick(GUIControl *control, MouseButton button)
{
  gNotebookLocations.Visible = false;
  gNotebookIndex.Visible = true;
}


//NoteBook Put Away Command
function BPutAway_OnClick(GUIControl *control, MouseButton button)
{
  gNotebookIndex.Visible = false;
}

//Location Page Zero
function BNextLoc0_OnClick(GUIControl *control, MouseButton button)
{
  //Turn to Page 1
LLocations.Visible = false;
  LBarAddress.Visible = false;
  LPoliceDept.Visible = false;
  LApartmentAddress.Visible = false;
  LLocations2.Visible = true;
}

//Locations Page 1
function BLastLoc1_OnClick(GUIControl *control, MouseButton button)
{
  //return to Page 0
    //Page 2 Labels Below as TRUE
LLocations.Visible = true;
  LBarAddress.Visible = true;
  LPoliceDept.Visible = true;
  LApartmentAddress.Visible = true;
    //Page 1 Labels Below as FALSE
  LLocations2.Visible = false;
}




probably some unnecessary lines, but it is working.

to navigate the "pages" is to toggle page buttons visible/invisible based on what "page" the user is on.

I've built "Index" page on a separate duplicate Gui with buttons that navigate to other pages. gNotebookIndex has buttons to call up their relevant GUIs.

The problem I will have is by navigating the GUI's using visible true/false commands is when I want an event, i.e use iNotebook on suspicious person, to toggle a label visible in the GUI, it will conflict with the navigation system.

Can you help me script a check for if that event has happened or is their a simpler way to do it?

Thanks again for your help

#3
Hi guys,

Need advice:

I want my character to add information to a notebook over the course of the game which the player can review.

I am thinking about using ChangeRoom when the player looks at notebook in the inventory to change the player to a Notebook room.

If the player has acquired information from a dialog option, an address for example, and I want to update the NoteBook room to reflect that, should I create a duplicate room and use an if/else statement to load it?

I thought about using one room and numerous objects that appear if dialog options have been chosen but I've heard too many can hinder performance.

Finally, I would prefer the notebook room to appear in a box (320x200) over the 640x470 game screen, will I have to use a GUI for that?

Thanks for any and all advice
#4
Resolved thank you!

However just to point out initially with your suggestion:

when cChar1 interacts with cProstitute from the right side of the screen, the animation is performed to the right (loop 0), when it should be facing left (loop 1)

when cChar1 interacts with cProstitute from the left the animation is performed to the left (loop 1)

Code: ags


//Show Badge Animation
          cChar1.LockView(11);
            if (cProstitute.x > cChar1.x) cChar1.Animate(1, 4, eOnce);
  else cChar1.Animate(0, 4, eOnce);
                  cChar1.UnlockView();
                    cChar1.FaceCharacter(cProstitute);
                      cProstitute.Say("Nice to meet you Detective Louie Thompson.");


The fully resolved code is:

Code: ags

//Show Badge Animation
          cChar1.LockView(11);
            if (cProstitute.x > cChar1.x) cChar1.Animate(0, 4, eOnce);
  else cChar1.Animate(1, 4, eOnce);
                  cChar1.UnlockView();
                    cChar1.FaceCharacter(cProstitute);
                      cProstitute.Say("Nice to meet you Detective Louie Thompson.");
 


Thank you very much!
#5
Hello,

Apologies first of all as I am very new to coding.

I have scripted some code to provide some basic animation during dialogue sequences.

This code is either part of a interact function or dialog.

The animation in question uses view 11, which has two loops.

Loop 0 is the animation to the right.

Loop 1 is the animation to the left

( I have not tried to call Loop 1 up within the code yet.)

Code: ags


 //Show Badge Animation
            cChar1.LockView(11);
            cChar1.Animate(0,4,eOnce);
            Wait(20);
            cChar1.UnlockView();
        cProstitute.Say("Nice to meet you Detective Louie Thompson.");


My objective is for the Char1 to animate loop 0

IF: The NPC is right of Char1

And therefore for Char1 to animate loop 1

IF: The NPC is left of Char1.

The game I am working on only has left/right views if that is relevant. Meaning it is a flat 2d Point and Click adventure game.

Any and all help is greatly appreciated, I've tried to find a relevant tutorial for this but I don't quite understand what if/else statements to use or if I need a Global Variable.

Again i'm new to coding.

Thanks for any help or feedback.
SMF spam blocked by CleanTalk