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 - Tonic Ink

#1
Hi Guys,

Just a quickie, I have a couple of clouds (as objects) moving across the back of my background.

No mater what speed I set, they just seem to move very 'rigid'. Almost as though they're moving at a rate of approx 5 pixels at a time.

Is this a limitation of the engine or is there a trick somewhere that I'm unaware of.

Cheers :D

EDIT: Another question while I'm here, whenever I close my game using the windows/X when testing the game she crashes and I have to alt-ctrl-delete. This usual?
#2
Hey Guys,

A quick question with I'm sure an easy fix.

I have an inventory button on my GUI, when clicked this opens the inventory window and plays a sound.

Problem with this is that if the player chooses to rapidly click the button, the sound ends up maxing out the channels and destroys the ambient track.

The fix i have implemented currently inserts a wait time after the payer clicks the button to ensure it's not clicked repeatedly. I don't like this, as it feels clunky.

THE CODE -

function btnBag_OnClick(GUIControl *control, MouseButton button)
{
if (gInventbag.Visible) gInventbag.Visible = false;
else gInventbag.Visible = true;
aSOUND3.Play();
Wait(30);

I think the code i'm looking for is something along the lines of.

if sound is playing aSOUND3 = false
play sound aSOUND3

Something along those lines. Just can't code it properly with my insufficient brain.

I can play queued, however it just banks up the sounds, obviously.

Hope that makes sense.

Cheers :)
#3
Quote from: Gilbet V7000a on Wed 25/11/2009 10:33:06
I'm not sure whether you retyped the codes or copied them directly from your game's script (since there're some brackets and incompleteness problem, like the awkward closed ) in the last line), but I'll assume it's the latter as after you fix one problem you can fix the other problems anyway when you encounter another error message.

When you have a GUI button called bowel the property bowel.NormalGraphic is automagically created, so you don't need to (you cannot) redeclare it by using something like int bowel.NormalGraphic.
The first thing to do is to remove the "int" in the last line.

Also, as mentioned above, that last line has an extra ) at the end and the line does nothing, unless you're going to assign some value to it, something like:

int bowel.NormalGraphic = 12;



aha, success!

bowel.NormalGraphic = 30;

worked a charm.

I'm sorry for these seemingly absurd questions. The method of how to code in AGS is starting to show context for me now slowly :)
#4
I'm easily missing something here.

THE CODE -

function bowel_OnClick(GUIControl *control, MouseButton button)
{
bowel.Animate(6, 0, 4, eOnce);
int ran=Random(2);
if (ran==1) aFart2.Play();
else if (ran==2) aFart3.Play();
Wait(80);
int bowel.NormalGraphic);


Error: GlobalScript.asc(462): Error (line 462): Already referenced name as import; you must define it before using it


Essentially, I click the button, it animates, then returns to its original graphic. Animate and random sound work fine. Just having a wee bit of trouble getting the graphic to return to it's original still frame (aka normal graphic).

Bluntly followed the help documentation as you can see by the last line of code. I know i'm missing something here.

Help would be fab :)
#5
Quote from: speewave on Tue 24/11/2009 11:39:37
What if its not an AGS thing, more like a GPU\Monitor thing...

Check any Monitor or Graphics cards settings .... from my nVidia Control panel i get many options on screen stretching for Hardware strecthing (GPU) or Monitor Streching (some monitors do have functions)

Yeah, It's easy enough to set your monitor to display as aspect rather than full. However setting this up may be beyond the initial scope/patience of the casual PC user who simply wants to try out your game.

hence why the auto-side border feature is really exciting.
#6
If it hasn't already been mentioned it'd be pretty neat if you could assign views to GUI buttons/labels/bg image etc.
#7
Quote from: Gilbet V7000a on Tue 24/11/2009 10:18:57
Well. This is a mystery, maybe the WAVE files were somehow compressed by some means (normally M$ .WAV files are not compressed) or are using "non-standard" frequencies and/or number-of-bits, which fail in the engine's player. I think the editor's "thingie" would just play whatever stuff media player is able to.

Anyway, yeah, just use MP3, or better, OGGs, instead. There isn't much point to bloat a game's size by using uncompressed WAVEs now (except perhaps for place holder audio to save you the time in compressing them).


Totally agree, ironicallyi only used WAVs originally as I thought it would lend itself to be less problematic whilst testing
#8
Quote from: Khris on Tue 24/11/2009 09:56:39
Hmm, in winsetup, is "Use speech pack if available" checked? Is there a speech.vox file in the Compiled dir?

Seems the two WAV files I originally used infact (clipped) when I played them in the editor, re -exported the sound files in sonar as MP3s and it works perfectly now :S

Sorry for time wasting guys.

EDIT - ok seems to dislike WAV files, the MP3s work though :S
#9
Quote from: Khris on Tue 24/11/2009 09:43:53
Tested that using your script line and a file called "CNAR1.wav"; it worked immediately, even without rebuilding anything.
Does the wav file play if you put it in the Sounds dir and call it as Sound?
Also make sure it is named "CNAR1.wav" and not e.g. "CNAR1.wav.wav". If you're using the Windows Explorer to manage files, turn off the "hide known extensions" option in the folder options.

If you're using MIDIs for music, make sure that the wav device isn't muted.

Cheers,

I always have show extensions enabled so unfortunately that's not the problem.

The WAV plays perfectly in the built in AGS sound preview 'thingy'. A have many sounds already working within the game (incl footsteps assigned to view frames etc.) so it can't be due to any conflics in the file type or the exporting of the wavs (have tried OGG and MP3 to boot).
#10
Quote from: SSH on Tue 24/11/2009 09:13:24
Isn't it just a setting on the General Settings pane?

Oh my god... I am truly a sad case.


I didn't realize you had to set the cursor graphic in the inventory properties.

please punish me accordingly :P

Sorry about that.
#11
Quote from: Gilbet V7000a on Tue 24/11/2009 09:05:07
Try it with the file name NAR1.wav instead, unless that C is a part of the character's name.


Tried that :(

The script name is actually 'CNAR'

Wouldnt have anything to do with channels would it? as I have an ambient track
#12
Hi guys,

Probably a silly noob question.

In my code I have the following -

function test_AnyClick()
{
CNAR.Say("&1 Can't do that");


I have a file called CNAR1.WAV in my speech folder.

Low and behold when I click the object it displays the message by no speech is heard.

I've tried rebuilding etc.

Help would be appreciated.
#13
Quote from: Snake on Tue 24/11/2009 03:41:12
QuoteMate, if you could possible give me a steer in the right direction on how to do this, I'd be forever in debt...

Easy, you don't want to know what his debt entails.

If I were a man of my word, this would trouble me.. :)
#14
Quote from: Pumaman on Mon 23/11/2009 22:56:36
I have retested this on my machine, and it is definitely working for me with 320x240 and 640x480 games.

However, it doesn't seem to be working with 800x600 games, and 1024x768 games create the sideborders but the game screen isn't properly centred -- I will look into these issues.

To those of you saying it's not working, what resolution is the game, and what is your Windows desktop resolution?



Thanks for the look-in CJ :)

My game res is 1024x768, screen res is 1920x1200
#15
Quote from: SSH on Mon 23/11/2009 15:50:09
The module doesn't do anything to the cursor at all, so yes it shoudl be possible with no extra effort.

Mate, if you could possible give me a steer in the right direction on how to do this, I'd be forever in debt :)
#16
Is it possible to disable the Verb mode completely.

As in... hover hotspot under mouse location (as per normal) But retain the sierra/AGS style use inventory graphics as mouse cursor (remove the whole 'use pen on paper').

Cheers :)
#17
Quote from: Tonic Ink on Sun 22/11/2009 09:34:37
Hi Guys,

I'm very inexperienced with coding in general, if I could possibly poach some help here :)

I use the Description module for displaying hotspots under the mouse curser. I'm having trouble as it also displays this for inventory objects (the description falls behind the UI graphic).

I also want to disable the "use paper on fence" inclusion and retain the original inventory icon mode (pointer changes to inventory graphic).

I've edited both my global script and the description.asc to -
Description.IncludeInventory=false;  

with no success, I've also tried the following code in my repeatedly execute -
if (gInventbag.Visible) Description.IncludeInventory=false;

but no cigar :(

What am I missing here?

Would very much appreciate some clues. :D


OK half solved this (always soon after a SOS post)

Made a new GUI  with a higher Z order and set Description.GUIMode(label)etc.

however I'm still having the "Use Pen on Paper" issue.

Just want to disable Verb mode all together and go back to (change cursor to inv graphic)
#18
Beginners' Technical Questions / Re: Mouse bug
Sun 22/11/2009 09:39:05
Quote from: Ethan Damschroder on Sat 21/11/2009 06:21:50
since the repetedly execute section executes every frame it will do it 40 times in a seconds so when you change the cursor mode it will remain until the function checks to see if the game is paused then changes back, which is why it just flickers.

It would be better to disable the other mouse modes during this scene

Use mouse.DisableMode for this, then just enable it after you leave the title screen

Aha, I'm glad I thought of that ;)

Thanks a ton
#19
Hi Guys,

I'm very inexperienced with coding in general, if I could possibly poach some help here :)

I use the Description module for displaying hotspots under the mouse curser. I'm having trouble as it also displays this for inventory objects (the description falls behind the UI graphic).

I also want to disable the "use paper on fence" inclusion and retain the original inventory icon mode (pointer changes to inventory graphic).

I've edited both my global script and the description.asc to -
Description.IncludeInventory=false; 

with no success, I've also tried the following code in my repeatedly execute -
if (gInventbag.Visible) Description.IncludeInventory=false;

but no cigar :(

What am I missing here?

Would very much appreciate some clues. :D

#20
Hey guys,

I've probably tackled this the wrong way but alas.

I've set my mouse mode to pointer during my menu screen, when I right click (point cycle) i can briefly see the following pointer flicker although the pointer mode is unchanged.

Here is my code -

function repeatedly_execute() {
 
 // put anything you want to happen every game cycle, even when
 // the game is paused, here
 
 if (IsGamePaused() == 1) return;{}
   if (Gui2.Visible) mouse.Mode = eModePointer;{}


Perhaps I could disable pointer cycling during this room?

Any help would be greatly appreciated :)

regards,
SMF spam blocked by CleanTalk