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

#1
Ha ha. Funnily enough, I did know about this, but have forgotten in recent times. I've been writing the coordinates into the room script file as comments until I added it to a function.
#2
I'm unfortunately getting yet another error. This is what happens when I click on a game. (My phone's a Galaxy Note 3.)



I've looked around on my phone and in Windows to see if I can allow write privileges to the card, but I have no idea how to get it to work. There's plenty of space on the card.
I've tried both the latest version at http://jjs.at/daily/ (which is AGS_2013-10-24_16-22-13.apk) and AGS_2014-4-30.apk (found at https://bitbucket.org/monkey0506/ags/downloads/AGS_2014-4-30.apk).

This seemed to start since the latest firmware update.

Edit - The latest update for my phone (4.4.2 - KitKat) actually disables write permissions for 3rd party apps onto the SD Card. I moved the games to device storage and now they work fine. Bit of a pain, but that's Google's fault.
#3
Quote from: Gabarts on Mon 09/06/2014 08:23:05
Interesting posts

Would be nice to add a randomizer for the code. Each time the game starts it mixes up the correct sequence for the hotspots or buttons...
is possible to do?

Definitely. Using monkey_05_6's method, wherever you set the password, just do this:

Code: ags

int ran = Random(2); //Gives you 3 random passwords. 0, 1 and 2.

if (ran == 0)
{
  sPanelPassword = "1234";
}
else if (ran == 1)
{
  sPanelPassword = "4321";
}
else if (ran == 2)
{
  sPanelPassword = "9876";
}


That's how I'd do it. Not sure if there's a simpler way.

EDIT - Damn. Ninja'd. gerok's would work with a 100% random code. Mine only does a pre defined set.

EDIR 2 - Oh. You'd have to have a second variable to compare sPanelPassword with for my method, so you'd have to modify monkey_05_06's method/code slightly to fit what I've suggested. For example:

Code: ags

/*Global strings:
sPanelPassword: What the password is set to.
sPanelPasswordEntry: What the numbers entered on the panel are.

Then to check the password: */
if (sPanelPassword == sPanelPasswordEntry)
{
  //whatever happens.
}
#4
Ah, damn. You're 100% correct, monkey. I'm using the draconian edition because I like the black background in code. Oh well, no biggie. I'll get a vanilla version and try it when I'm back on my PC.

EDIT - Yep, as you said. Compiled them with AGS 3.2.1 and it's fine.
#5
Sorry to post, again, another "it doesn't work" help requests, but I can not for the life of me get my game to show up.

EDIT - I now get the game to show up, but I get "script link failed: Runtime error: unresolved import 'Character::ChangeRoom^4'. I don't get this error on Windows though.
EDIT 2 - I got another game to work however. I guess there's something in my scripts that makes it stuff up. I do have the keyboard movement module in the first game I tried, maybe that's it?
EDIT 3 - Actually, with all games except one this happens, regardless of how many modules I have. :/

I downloaded the latest engine from the link in the OP and installed it on my phone (Galaxy Note 3). When I put my game (.exe, winsetup and acsetup.cfg) on the SD card (I make a folder in there called ags, then another folder in that which mirrors my game's name) and run the app, it says there's no game installed in "storage/emulated/0/ags". I even created folders mimicking that and can't get the games to show up.
#6
Quote from: monkey_05_06 on Wed 30/10/2013 06:10:43
Well coming at that question from the opposite angle, why would someone define member functions if the instances have no members on which to function?

Assuming I understood that right, I thought the exact same thing. I mean, maybe you could make a wallet for example only using functions within a structure.

For example:

Code: AGS

//Some kind of wallet

struct wallet
{
  import static void addMoney(int money);
  import static void loseMoney(int money);
  import static void getStolen();
};

//Then you could use:
wallet.addMoney(20); //and so on.


But it would be much simpler (or more readable, at least) to have:

Code: AGS

struct cashCarrier
{
  int money;

  import void getStolen();
};

cashCarrier wallet;

wallet.money += 20;


So, without creating an object out of the structure, there's no real point in having one.
#7
Quote from: Crimson Wizard on Tue 29/10/2013 15:28:52
Here's a tip, though: if you are not adding any variables to struct, then declare all functions as "static" and use the struct without creating actual object

Thanks for that. Works fine. However, I don't really know why someone would use that instead of just using normal functions unless they want to put a group of certain functions together.

For clarification (in case I get the "well, the reason you were using it is why" :-D), I was doing it just as an experiment. I generally have variables as well as functions when I create structs, so I've never run into this before.
#8
I've just found that if I make a structure and only have a function in it:
Code: AGS

//script header

struct thing
{
  import void Thisfuction();
};

import thing mystruct;


and the code in the .asc file being:

Code: AGS

thing mystruct;

void thing::Thisfuction()
{
  QuitGame(0);
}

export mystruct;


and try and use it:

Code: AGS

mystruct.Thisfunction();


I get the "Script link failed: Runtime error: unresolved import mystruct

However, if I add a variable to my struct, in this case, an integer:

Code: AGS

struct thing
{
  int whatever;

  import void Thisfuction();
};


and change nothing else, the error doesn't happen.

Bug or is there something I don't know about?
#9
I tested your code out in one of my games and what happened is that the if and first else if statements ran, but the last else if didn't. I think the problem might be that you have every condition has gQuit_Gui being visible, so the middle else if runs no matter what key is pressed and the last one will never run, seeing as it's also an else if (else if statements will only run if the previous if or else if is false).

Code: AGS

if (gQuit_Gui.Visible == true)
{
  if (keycode == eKeyY)
  {
    QuitGame(0);
  }
  else if (keycode == eKeyN)
  {
    gQuit_Gui.Visible = false;
    gMenu_Gui.Visible = false;
    gMenu_Gui.Clickable = true; //See my edit below for why this is here.
  }
}


This works fine for me. I don't know what you needed the middle else if for though. Could you explain?
EDIT - From my understanding, it seems to be that you don't want the menu GUI clickable when the quit GUI is up. Is that right? If so, put gMenu_Gui.Clickable = false; where ever you put gQuit_Gui.Visible = true;
Don't forget to make the Menu GUI clickable again after you press N though.
#10
Quote from: Armageddon on Tue 12/06/2012 05:14:38Also I was wondering how you display a quitting GUI when you try to close the game?

To use the built in Quit GUI, just use
Code: AGS

QuitGame(1);


If you want to make your own GUI, set it up with a label saying "Are you sure you want to quit?" (or whatever you want), and two buttons. The "yes" button (the one that quits the game) to have:
Code: AGS

QuitGame(0);


And the "no" button to close the GUI.
Code: AGS

gQuitGui.Visible = false;


Also, call me stupid, but can you still put code in a little box like you used to? I can't find any option for it. Found it. ;-D
#11
Thanks for your replies, guys. I'm not at my PC at the moment, but I'll set this to solved and try out the tween module later. If I've got any problems from there, I'll edit the title again.
#12
I've set the option for GUIs in game settings to "be hidden", but for the first GUI that appears, I want it to be able to fade in and out which I'd do with a while loop. However, while loops block the game, thus making the GUI hidden during the while loop. Is the a function to change the behaviour when the interface is disabled?

Also, changing the behaviour in game setting to "display normally" or any other option won't work, as I'd still have to change the behaviour to "be hidden" afterwards.
#13
Engine Development / Re: AGS engine iOS port
Wed 23/05/2012 06:46:35
Yep, that fixed it. Thanks JJS.  :-D
#14
Engine Development / Re: AGS engine iOS port
Tue 22/05/2012 20:30:27
This is brilliant. My games run perfectly on my iPhone 3GS running 5.1.
Pity I can't use it on my iPad 3 until the jailbreak is released.

Edit - Ah, slight problem when downloading the Midi patches. My phone keeps saying "Hash Sum mismatch" when it gets to "Done: AGS Midi patches". I don't know if this is a problem with the download or the file and if you can fix it or not.

Edit 2 - Thought I'd edit this post to say that it works perfectly on my iPad 3 running iOS 5.1.1. It runs like a regular iPhone app, running in a small screen, but allowing me to upscale it by pressing the 2x button.
#15
Quote from: GrimReapYou on Tue 14/02/2012 17:26:15
1.Cant find any way to make inventory items interact with anything but other inventory items and the ego himself.

2.Follow char doesnt seem to be stopping on command.

1. I'm pretty sure each character, object and hotspot has a "use inventory on x" option in their interaction pane (the lightning bolt menu).

Code: ags

function cRandomNPC_UseInv()
{
  if (player.ActiveInventory == iDagger) // If the player is using the dagger on cRandomNPC
  {
    //Some dagger code
  }
}


2. Using StopMoving will only make the character stop moving. If he's following another character, he'll resume moving once the command has moved on. If you want a character to stop following another, you have to use:

Code: ags

cdag.FollowCharacter(null);
#16
I can help with the dagger going to the mouse coordinates, but I have no idea about stopping at walkable areas. Sorry.

For going to mouse X and Y:

Code: ags

cdag.Walk(mouse.x, mouse.y, eBlock);


Hope this helps you.
#17
Quote from: Ghost on Thu 02/02/2012 14:04:55
Quote from: Creator on Thu 02/02/2012 13:38:34
I'm thinking about doing something similar as the OP and I'm pretty sure I can do reading and writing to a file, but how could I go about doing this?

There's a module for that- I have not tried it out myself and it's pretty old, but maybe it's useful:
http://www.adventuregamestudio.co.uk/yabb/index.php?topic=23109.0

Thanks, Ghost. I'll check that out.
#18
Quote from: cat on Thu 02/02/2012 12:43:39
You could also encrypt the textfile or add a checksum to avoid that players might edit it.

I'm thinking about doing something similar as the OP and I'm pretty sure I can do reading and writing to a file, but how could I go about doing this?
#19
Because AGS games take up very little resources compared with today's computers, I'm sure that what graphics card you have won't matter in the slightest when developing an AGS game.
#20
Quote from: Khris on Wed 25/01/2012 08:10:00
It sure sounds like it.
because
Quote from: octochan on Wed 25/01/2012 07:40:01
[The only other character in the game right now is the default cEgo.

cEgo, by default, spawns in room 1, which I'm sure most AGS users have as they're starting room. See if cEgo and your player character's starting room are the same.
And as Khris suggested, it may be a room object, though having it at an almost exact starting postion as the player character is unlikely without coding, which you've said that you've done none of.
SMF spam blocked by CleanTalk