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

#221
Hey guys,

Just need to change my mouse mode and graphic with the following code - mouse.ChangeModeGraphic(eModePointer, 7);

I can do this for hotspots as it allows me in the properties pane. Can I implement this same code for pointer over an object?

If so how?

Any help would be greatly appreciated.
#222
Will try this tonight, Looks great!
#223
AGS Games in Production / Re: THE BUM
Mon 10/12/2012 20:59:19
Can't wait to play this one!
#224
Quote from: DazJ on Wed 16/05/2012 15:52:15
Running my 1280x720 game I receive the following error as soon as I try to run it:

"The background scene for this room is smaller than the game resolution. If you have recently changed the game resolution, you will need to re-import the background for this room."

ALL backgrounds are 1280x720 and I even double-checked and re-imported them all so I've no idea why I'm receiving this error? I also tried starting the game in different rooms but still receive the same error.

Just thought I'd mention. I have a 1024 x 800 game, wouldn't work (same error as you'd received) on my galaxy s2. I recently bought a galaxy note and the game works fine (as the note is 800 pixels wide/high - Galaxy S2 only 480 pixels. wide).
#225
Badass dude, I'll give those a go when I get home.
#226
Before I start, I spent a good part of last night hunting for a solution to this. Most of the old threads I dug up didn't seem relevant.

Though it would seem to me like a pretty common query. Appreciated in advance.

I'd like to my mouse cursor to change mode whilst it's hovering over a GUI that is 'always on'. (I have the code for this, too easy).

To implement it...

I can run a repeatedly execute to do this for a mouse x, y pos. However quite a few of my backgrounds are scrolling, so the X co'ord changes :(

I've also tried drawing a hotspot on the room and have the cursor change whilst over the hotspot. Once again, doesn't work properly with a scrolling background.

I know I'm missing something incredibly simple here.


Cheers,

Nick
#227
More than fair. Actually, I surprised myself by working out global variables with some perusing. An achievement as my stupidity knows no bounds.
#228
Quote from: Khris on Sun 20/05/2012 09:38:26Re "extensive forum search":
3rd result when searching for "specific item": http://www.adventuregamestudio.co.uk/yabb/index.php?topic=44986

^^ I stand corrected.

Dude... I'm honestly not trying to be 'douchey' here.

However, It's the equivalent of myself going into the critics lounge and spouting "Where's your light source? WTF?? There a are multiple tutorials online re light sources, don't bother us here. Don't take this too personally" etc.
#229
Khris.

Whilst I did an extensive forum search, It's quite hard for us non-coders to apply out of context examples believe it or not.

I did not ask about the function of 'doonceonly' in this thread as it was in my original code (which i'd learn from my other thread - thanks for that :))... it was an issue with the bracers.

I know it can be frustrating and I do apologize. However, there's really no need to be so overzealous. There's more time & energy exhausted in your post than in my threads combined.

This forum doesn't exactly have a high-traffic problem, and I'm beginning to know why.

Things have changed since 2002. :(
#230
^^ that's really cool - makes a bit of sense now :)

Thanks again.
#231
Quote from: monkey_05_06 on Sat 19/05/2012 03:01:13
Quote from: Nixxon on Sat 19/05/2012 01:50:34...once object 5 disappears I'd like for a sound to play, and a givescore. THE FIRST TIME only however.

Seeing as you want this to be part of the condition where the object 5 is turned off, why didn't it occur to you to put it inside the braces for that condition? You do understand what those braces are for, yes?

Code: ags
function room_RepExec()
{
  if ((screw1.Visible==false) && (screw2.Visible==false)&& (screw3.Visible==false)&& (screw4.Visible==false)) 
  {
    oObject5.Visible=false;
    if (Game.DoOnceOnly("open mains"))
    {
      aOpenlock.Play();
      GiveScore(2);
    }
  }
}


Edit: Sorry if the tone sounds a bit condescending, but we were just talking about braces, weren't we? ;)


i DID that... however as it is in the repeated execute. The sound kept playing, and I kept getting a score on every game loop. :(

EDIT: Just tried your code, works a treat. I really have no idea with all the braces/brackets do. Just shitting in the wind here. :)
#232
BACK:

Everything's working sweet. However, once object 5 disappears I'd like for a sound to play, and a givescore. THE FIRST TIME only however.

How to i integrate this into the Rep Exec function?

I've tried a few different things -


function room_RepExec()
{
  if ((screw1.Visible==false) && (screw2.Visible==false)&& (screw3.Visible==false)&& (screw4.Visible==false))
  {
    oObject5.Visible=false;
  }
    if (Game.DoOnceOnly("open mains")) {
    aOpenlock.Play();
    GiveScore(2);

}


The above just gives me a score and plays the sound as soon as I enter the room.
#233
EDIT: We're all good.

Had to add from the events pane.


Thanks again. I'l be back :)
#234
Indeed all of my closing brackets were missing :P

The use specific items works great now, thank you!

The repeated execute doesn't seem to work however. After all 4 objects are removed, Object 5 still remains.


function room_RepExec()
{
  if ((screw1.Visible==false) && (screw2.Visible==false)&& (screw3.Visible==false)&& (screw4.Visible==false))
  {
    oObject5.Visible=false;
  }
}


Any ideas?

Thanks again.
#235
Hi madd,

Thanks for that.

Seems like it should work OK, though now I'm having trouble =

room9.asc(9): Error (line 9): Nested functions not supported (you may have forgotten a closing brace)


What am I doing wrong here?


/ room script file
function room_RepExec()
{
if ((screw1.Visible==false) && (screw2.Visible==false)&& (screw3.Visible==false)&& (screw4.Visible==false))
{
oObject5.Visible=false;
}

function exitroom_AnyClick()
{
player.ChangeRoom(6, 760, 460);
gGui1.Visible = true;
justinv.Visible = false;
}


function screw1_UseInv()
{
  if (player.ActiveInventory==iKnife)
{
aMetal_Decay.Play();
object[1].Visible = false;
GiveScore(1);
}

function screw2_UseInv()
{
  if (player.ActiveInventory==iKnife)
{
aMetal_Decay.Play();
object[2].Visible = false;
GiveScore(1);
}
#236
Hi Guys -

two relatively simple questions.

Question 1

How do I specify a SPECIFIC inventory item used on the object? As it stands I can use ANY inventory item on the objects to gain the desired effect :(

I tried putting the inventory ID/script name inside the brackets after UseInv with no success.


function screw1_UseInv()
{
aMetal_Decay.Play();
object[1].Visible = false;
GiveScore(1);
}

function screw2_UseInv()
{
aMetal_Decay.Play();
object[2].Visible = false;
GiveScore(1);
}

function screw3_UseInv()
{
aMetal_Decay.Play();
object[3].Visible = false;
GiveScore(1);
}

function screw4_UseInv()
{
aMetal_Decay.Play();
object[4].Visible = false;
GiveScore(1);
}


Question 2.

Re the script above. Once the player interacts with each object I'd like another object to appear on screen.

As you can see each object is set to false when they're interacted with. Do I use a repeatedly execute function of some sort? Like if Object 1,2,3,4 = false. Then object 5 = true?


I'm getting there....

Really appreciate the help.
#237
Quote from: Khris on Fri 18/05/2012 10:02:24
http://www.adventuregamestudio.co.uk/manual/Game.DoOnceOnly.htm

In general, things like that are handled using variables.

Badassery, I was looking for that. I rememberd it being (first time only). Thanks again. :)
#238
A real simple one from a dummy.

The player 'interacts' with a hotspot (which then gives him a score). easy.

However - I only want this to happen the FIRST time the player 'interacts' with the hotspot.

I'd rather not turn the hotspot OFF after it is clicked... as i'd still like to keep the mouse-over ID.


- the script -

function Bush_Interact()
{
CLIF.Walk(760, 460,  eBlock,  eAnywhere);
object[0].Visible = true;
GiveScore(2);

}

Much appreciated :)
#239
Quote from: Eric on Tue 15/05/2012 02:02:41
Quote from: Nixxon on Tue 15/05/2012 01:07:29Now if only we could implement some more 'modern' resolutions/aspect ratios in the editor.

I brought this up in another thread, and was pointed to this development branch. FYI!
\

Nice! Let me know if you need a hand with the UI.

I did the graphics for Dospad (idos) among other things - http://toucharcade.com/2010/10/26/idos/ (screenies in there).

#240
Quote from: Joseph DiPerla on Mon 14/05/2012 01:06:06
Nixxon. You would have to build an APK File that would install both AGS and the game together. But thats not an easy task to do. I am trying to create something for the community so that you can all sell commercial games independantly in the Android Market. Of course, this tool will be available free of charge as well. Just give me some time to finish it up.

That's absolutely unreal! I'd pay sums for that. Legend.

Now if only we could implement some more 'modern' resolutions/aspect ratios in the editor.
SMF spam blocked by CleanTalk