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

#1
General Discussion / Re: Free Steam keys!
Sun 19/02/2017 07:33:23
Quote from: LimpingFish on Sun 19/02/2017 02:49:41
Hello!

I have the System Shock Collection up for grabs. First to post gets it!

I'll take it, good sir!
#2
Quote from: Snarky on Wed 18/11/2015 21:55:41
It's almost certainly the cursor "hotspot" (I forget what it's called). Instead of being at the center of the crosshairs as you expect, it's in the top left corner. You can set it where you define the cursors.

Thanks! That did the trick.
#3
Quote from: phillipPbor on Wed 18/11/2015 19:51:10
imagine it was an AGS game but RPGmaker game in a same time?

to you think it will be a best idea? how did you do it when you face an enemy?

Read here: http://www.adventuregamestudio.co.uk/forums/index.php?topic=13649.0
#4
Hello,
So I noticed lately that all my buttons and hotspots isn't giving me the right "hover-cursor-over" place where they should be. Don't get me wrong, they're all still in their right physical place, but whenever I move my cursor over the "Give" button, I find that it's not lit up (a.k.a. clickable) until I move the cursor a little further down. I've included examples in here so you can see what I'm talking about.







Now, I don't think it's an GUI error, because it happens to hotspots too. Any ideas here, anyone? :/
Using AGS 3.3.4 with the 9-Verb MI-style template.
Thank you!
#5
Any news on this module? Would truly love to use it :)
#6
Quote from: Khris on Thu 23/07/2015 01:05:49
Just add another else if block and check for GateRegionWalk being equal to 2.
Inside, call player.StopMoving().

You only need two variables if you're dealing with two independent game states.

Thank you, it's working now!
I solved it by editing the hotspot script like this:
Code: ags

function hGate_AnyClick()
{
  // WALK TO
  if (GateRegionWalk == 3){
    player.StopMoving();
    player.Say("Blablabla.");
  }
  else if(UsedAction(eMA_WalkTo)){
    player.Walk(350, 190, eNoBlock, eWalkableAreas);
  }
  else Unhandled();
}

And then adding a second region beneath the first one, and making this script:
Code: ags
function region2_WalksOnto()
{
  if (GateRegionWalk == 3){
  player.Say("Blablabla.");
  player.Walk(130, 265, eBlock, eWalkableAreas);
  }
}


Thank you for the help Khris! :)
#7
Thank you Khris, that did the trick!
Although, now I have another problem. If I wanted the player to stop walking on the region, and instead (when you click the region or walk onto it) say something like "No way, I'm not going near that thing again". How would I do that with the Global variables in place?
Right now, my script looks almost like this:
Code: ags

function region1_WalksOnto()
{
  if (GateRegionWalk == 0){
    Blablabla
    GateRegionWalk = 1;
    }
  else if (GateRegionWalk == 1){
    cPlayer.ChangeRoom(1, 100, 200);
    GateRegionWalk = 2;
    }

That's where it cuts off to room number 1, but if the player were to click on the region/hotspot in front of it, how would I make the character refuse to go there? Can I still use the Global Variable or do I have to create a whole new variable for that to work?
#8
Hi again everyone!
Need a little help with my script that I believe you guys have a nice solution to :)

So I've created a region in a room; when the player walks onto this region, he will change rooms and say a few words when he enters said room.
This is how my script looks like for room number 2:
Code: ags

function region1_WalksOnto(){
    player.Say("Blablabla.");
    player.ChangeRoom(1, 100, 200);
}

Now, as I said, when the player changes room I want him to say a few things, so this is my script in room no. 1:
Code: ags

function room_AfterFadeIn()
{
  if(player.PreviousRoom == 2)
  {
    player.Say("Please help me find a solution to this problem!");
  }

However, my problem is, the player will say this line every time he enters the room, even if I don't walk onto the region. How do I make him say it only once and not every single time I enter the room?

Thank you for your help!
#9
Quote from: Crimson Wizard on Tue 21/07/2015 10:32:22
Alright, I found what was wrong with tobulos1's project.

Thing is that AGS does define "character", "inventory" etc arrays only if there are characters and inventory items, because it cannot declare array of 0 size.
To fix the problem, create at least 1 inventory item.

I will think how we may improve this to prevent such cases in the future.

Oh my, thank you! That certainly did the trick! I just had to create one inventory item and I was all set! Thank you so much Crimson :)
#10
Quote from: abstauber on Thu 16/07/2015 20:35:19
Hmm... I just did the same and it compiled fine. I started up AGS 3.3.2 and used the older template included to create a demo game.
Then I pasted your two script files over and it still works. So assume, something else must be wrong - the script files are fine as it looks.

If it's not too much to ask, maybe you could upload your complete project somewhere and provide me a download link via PM.

Sent you a PM with my project. Thanks for looking into it!
#11
Quote from: Crimson Wizard on Wed 15/07/2015 10:00:01
This is very strange. "inventory" is a built-in global variable, it must be there, unless its a bug in AGS.
Can you tell, what would happen if you try using this variable somewhere in your script?

Maybe trying "Rebuild All files" may help?

Rebuilding all files didn't help, unfortunately :(

Quote from: abstauber on Wed 15/07/2015 10:43:16
@tobulus1: your version is alright, I just wondered why the inventory array causes trouble. The so called undefined symbol is an internal AGS variable which us just being used by the template. If you upload the sources of your project and pm me the link, I could take a deeper look into it.

Do you want me to send you the whole script (e.g. from Pastebin) or anything else?

Btw, forgot to say this: when I double-click the error, it takes me to guiscript.asc, and it highlights the following line:
Code: ags
if (player.ActiveInventory==inventory[key]) {


In context, this is the whole block of code:
Code: ags
text, text...

else if (UsedAction(eGA_UseInv) && key>=0) {
    if (any_click_move (x, y, dir)) {
      if (player.ActiveInventory==inventory[key]) {
        if (get_door_state(door_id)==1) { 
          if (!String.IsNullOrEmpty(get_door_strings("closefirst"))) player.Say(get_door_strings("closefirst"));
        }
        else if (get_door_state(door_id)==2) {
          if (unlockDoorSound != null) chan = unlockDoorSound.Play();
          if (!String.IsNullOrEmpty(get_door_strings("unlock"))) player.Say(get_door_strings("unlock"));
          set_door_state(door_id, closevalue);
        } 
        else if (get_door_state(door_id)==0) {
          object[obj].Visible=false;
          set_door_state(door_id, 2);
          if (!String.IsNullOrEmpty(get_door_strings("relock"))) player.Say(get_door_strings("relock"));
        }
      }
      else if (!String.IsNullOrEmpty(get_door_strings("wrongitem"))) player.Say(get_door_strings("wrongitem"));
    }
  }
  else result=0;
  
  return result;
  // 0 = unhandled
  // 1 = handled
  // 2 = NewRoom
}


Here's the whole GUI script (asc) and the GUI header (ash).

EDIT: Again, I have only copied the template scripts + GUI over to a fresh blank project. The only thing I have modified are the sprite IDs in the script, since I'm using my own at the moment.
#12
Quote from: abstauber on Tue 14/07/2015 22:27:00
Hey, nice to see that there are still some 9 verb projects in the makeing :)
Could you please tell me the version of AGS you are currently using? Did you update AGS as well as the script?

At least in AGS 3.3.3 and AGS 3.4.0.5 the inventory array is still there, so I need some more info.

Oh, of course! Sorry.
I updated the template and the editor to 3.3.4. Should I try with 3.4.0.5?

Thanks!
#13
Hi! Nice work on the template, appreciate it!
Although, I am receiving an error after the update:
Code: ags
guiscript.asc(1385): Error (line 1385): undefined symbol 'inventory'


Should be noted that I have just exported/imported the updated scripts to my current game.
Any thoughts?
#14
Quote from: Mathias on Fri 01/05/2015 14:04:30
Should be enough to do what you want to do with your script:

function cNPC_AnyClick()
{
  // TALK TO
  if (UsedAction(eGA_TalkTo)) {
    dNPC.Run();
  }

I think the template you're using are set up so that if you use talk to the character will automatically move to the npc before running the dialoge script. What happens might be that the guiscript are first walking the character to the position close to the character you're talking to, and then running your scrip to move the character to a fixed position. You might have to look through the guiscript and adjusting the values connected to the talk to action there.

Sorry, didn't work. My character will then only walk straight on top of the NPC :/
I looked around in the GUI script and found:

Code: ags
else if (GSagsusedmode==eModeTalkto && IsInteractionAvailable(x, y, GSagsusedmode) && GSloctype==eLocationCharacter) {
        ActionLine.TextColor=ActionLabelColorHighlighted;
        if (GoToCharacter(character[GSlocid], eDir_None, NPC_facing_player, 1)) character[GSlocid].RunInteraction(GSagsusedmode);
        SetAction(eMA_Default);

Could the "GoToCharacter" value have anything to do with it? I'm not sure myself since I don't usually touch the script files much...
#15
Hello all!
In my game, I have an NPC (just a normal character) that I want my playable character to talk to. But whenever I choose "Talk to" and click on the NPC, my character will first walk to the NPC and literally stand on him before moving away to the side. I have the following code implemented:

Code: ags
function cNPC_AnyClick()
{ 
  cPlayableCharacter.Walk(116, 262, eBlock, eWalkableAreas);
  Game.TextReadingSpeed = 9;
  // TALK TO
  if (UsedAction(eGA_TalkTo)) {
    cPlayableCharacter.Walk(116, 262, eBlock, eWalkableAreas);
    cPlayableCharacter.FaceDirection(eDir_Left);
    dNPC.Start();
  }
  else Unhandled();
}


With this code, my intent was to have the playable character move to a fixed position AND THEN talk to the NPC. But my character will instead move to the NPC first (almost standing right on top of him) AND THEN move to the co-ordinates and talk to the NPC. What should I do? I'm using the 9-Verb template. Thanks! :)
#16
Quote from: slasher on Fri 10/04/2015 15:54:16
if you made 2 flowers as objects, 1 visible and one invisible, then when you look at the visible flower you would make it invisible and the invisible flower visible. both flowers would have their own description.

make invisible flowers clickable=false until visible.

food for thought.

afaik: GUI's are drawn above everything else.

Hm, I'll try to make objects out of it. If it still doesn't work, nvm :P

Although, the GUI should be clickable, right? So you can turn it off, and then I should be able to actually walk my character to where the text says "Walk to", "Pick up <object>", etc, isn't that so?
#17
Thanks for the links guys, but I couldn't get it to work. I suppose I'll have to make peace with myself and hope that they add it in the next release :)

As for the GUI problem; still not fixed, have been looking everywhere for answers, any advice?
#18
Hi guys! It's me, again :P

I tried to search the forums for this one, thinking it might be a common question, but I couldn't find anything. Either way:

If I want to change a hotspot name in the middle of a Look-At function, how would one do that? E.g. let's say we have a hotspot named "Flowers" then when I use "Look-At" at it, the character will speak some lines and after he's finished, the hotspot will be named "Beautiful flowers".

P.S. Using the Verb-9 template :)

EDIT: One more thing, whenever I'm trying to walk on an area that's covered by the GUI gAction, my character simply won't walk over it. I've tried mixing with the properties, e.g. setting the clickable area false, etc, like this picture.
How can I make my character walk over the GUI gAction? As of now, it seems as the GUI is functioning like a block or a wall that prevents me from moving my character there.
#19
Ah I got it working now! Thank you guys, much appreciated as always :)
#20
Hi!
I have two (almost) identical backgrounds. One with a door closed, and one with a door open (I didn't care to make objects out of the doors).
I want the character to be able to "open" the closed door so the game switches backgrounds to the one with the open door.

Is this possible?
If so, what would be the easiest way to do it? Create a hotspot around the closed door and have the player use "Open"/"Close" on it?
I'm using the 9-Verb template, btw.

Thank you for answers!
SMF spam blocked by CleanTalk