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

#41
ok i see, thanks guys!
#42
thanks! that's exactly what i was looking for:)

i have another noob question if i may:
what does "void" mean/do? i searched the AGS dynamic help but couldn't find any info on it...
#43
hey guys,

i would like to play a background sound in my room and randomize certain aspects:

1. i would like to define a certain time frame to randomize the delay between each played sound (somewhere between 40-400 cycles)
2. i would like to randomize which sound is getting played (something like 3 different sounds should be fine)
3. i would like to randomize the panning property of the played sound so each time it plays from a different "spot"

first i thought i could just use random() to define the length of a timer but then realized that random() always starts at 0.
so i guess defining different timers is the only way?
anyway here's what i came up with so far:
Code: ags
function WoodCreak () {
  AudioChannel *WoodCreak1Channel = aWoodCreak1.Play (eAudioPriorityNormal, eOnce);
}

function CreakPlay () {
  int CreakRandom=Random(2);
    if (IsTimerExpired(2)) {
      if (CreakRandom==0) {
      WoodCreak();
      SetTimer (2, 100);
      }
      else if (CreakRandom==1) {
      WoodCreak();
      SetTimer (2, 200);
      }
      else if (CreakRandom==2) {
      WoodCreak();
      SetTimer (2, 400);
      }
    }
}


with CreakPlay (); in room_RepExec() this works fine to somewhat randomize the delay between each play. however if i now start to introduce 3 different sounds i would end up with a whole bunch of if statements...which would be fine but i'm sure there's some smarter way to go about this? also i would still be missing the random panning for the sound which i have no idea how to achieve.

any advice would be appreciated:)

cheers
#44
thanks! i'll give it a shot later today:)
#45
Quote from: abstauber on Wed 03/05/2017 13:04:08
Yep. This can be configured globally in guiscript.asc.

perfect, thanks!:)

btw. what's the quickest/easiest way if i want to update my game to the latest version of the 9-verb template?
#46
ok, here's a quick follow-up question.
i got everything to work as it should now...almost.

when starting a dialog using
Code: ags
Dialog.Start()
AGS seems to move the PC towards the NPC.
so when i do this
Code: ags
else if (UsedAction(eGA_TalkTo)) {
    if (any_click_move (413, 131, eDirectionRight)) {
    dDialog.Start();
    }

the character moves to the NPC and then returns to the given coordinates before starting the dialog.
is there some way to supress this? what if i want the characters to stand really far apart while talking?
#47
Quote from: abstauber on Wed 03/05/2017 10:16:35
Since we use "AnyClick" the player doesn't automatically walk to characters anymore. This also applies for hotspots, objects etc.


aaah, i see:)
thanks!

might i suggest adding this to the sample function in GlobalScript.asc to avoid confusion for noobs like myself?;)

something like this:
Code: ags

/* Character, Object, Hotspot full blown SAMPLE
function cChar_AnyClick() {

  // WALK TO
  if (UsedAction(eMA_WalkTo)) {
    Go();
  }
  // TALK TO (characters only)
  else if (UsedAction(eGA_TalkTo)) {
    Unhandled();
  }
  // LOOK AT
  else if(UsedAction(eGA_LookAt)) {
    Unhandled();
  }
  // OPEN
  else if(UsedAction(eGA_Open)) {
    Unhandled();
  }  
  // CLOSE
  else if(UsedAction(eGA_Close)) {
    Unhandled();
  }
  // USE
  else if(UsedAction(eGA_Use)) {
    Unhandled();
  }
  // Push
  else if(UsedAction(eGA_Push)) {
    Unhandled();
  }
  // Pull
  else if(UsedAction(eGA_Pull)) {
    Unhandled();
  } 
  // PICKUP
  else if(UsedAction(eGA_PickUp)) {
    Unhandled();
  }
  // GIVE TO (characters only)
  else if(UsedAction(eGA_GiveTo)) {
    Unhandled();
  }  
  //USE INV
  else if(UsedAction(eGA_UseInv)) {
    Unhandled();
  }
  else Unhandled();
}
*/

#48
thanks, i actually did read the 9verb documentation but it's a lot to take in for someone like me who's never coded anything before. a lot of that stuff is still greek to me.
i'll try that "if-clause" thing tomorrow but it sounds like that should solve it. :)

i was not talking about the player character not being clickable btw. (of course i do not want him clickable)
it's all the NPC characters. they are "clickable" (their names show in the action bar) but when i left-click them the player doesn't walk up to them.
#49
EDIT:

in case somebody else runs into the same problem here's what was wrong:

1. i set "WalkToPoint" coordinates for the hotspots in the AGS properties window which caused a blocked "walk to" to be called when left clicking on them.

2. i failed to set the (eMA_WalkTo) action in the AnyClick function of characters/hotspots.
i.e.:
Code: ags

if (UsedAction(eMA_WalkTo)) {
    any_click_walk (238, 124, eDirectionRight);
  }


3. i didn't use if statements to avoid calling code that should be canceled along with the action
i.e.:
Code: ags

if(UsedAction(eGA_LookAt)) {
    if (any_click_move (391, 123, eDirectionLeft)) {
    player.Say ("blablabla.");
    player.Say ("bliblibli.");
    }
  }


-----------------------------------------------------------
hi,

i've done a search on this but all the answers i found seem to deal with vanilla/standard AGS functionality. i suppose it's a bit different with the 9verb template...

problem:

1. left clicking on a hotspot moves the character but blocks the game (cursor disappears)
2. left clicking on a character does nothing at all
3. using any interaction (open, talk to, etc.) walks the character over but once again the game blocks. the action cannot be cancelled.

what i would like to happen:

default lucasarts game behaviour: whenever a command is given (walk to, open, talk to,...left click or right) the character should walk over and only once it starts talking/interacting should the game "block".

it DOES behave correctly when using the "look at" (UsedAction(eGA_LookAt) function...
however this brings me to another question on the same topic:

for example, when the character has more than one line of dialogue when looking at something or any other action follows the initial "any_click_walk_look" command and the action is cancelled the script continues. how can i keep this from happening?
example:

Code: ags

if(UsedAction(eGA_LookAt)) {
    any_click_walk_look (203, 124, eDirectionRight, "bla bla bla"); //this can be cancelled successfully
    player.Say("bli bli bli"); //anything after still gets executed
    Wait (40);
    player.FaceDirection (eDirectionDown);
    Wait (20);
    player.Say ("blo blo blo");
}


in this case when the action is cancelled the character will still say "bli bli bli", face down then say "blo blo blo"...

cheers
#50
thanks!:D
silly me, i didn't set the block at all and failed to realize it defaults to "eBlock"...
#51
hi there,

like the title says i'm using the 9verb template (1.5.1...the one that came with the AGS install) and when i'm trying to repeatedly run code in "room_RepExec", to animate a background object, the cursor disappears.

can anybody tell me why that's happening?

thanks!
#52
awesome, thanks for the quick replies guys!:)
#53
Hey guys,

I'm just starting out with AGS and built a small test scene following the tutorials provided. So far so good.
The only thing I can't seem to figure out right now is how to avoid the "mixed resolution" effect when characters scale to a smaller size.
It seems to me the game is scaling to the final resolution before rendering...?
I tried setting up the game to be 320x200 and after building the exe I set the options to use "native game resolution" and "stretch to fullscreen".
However what's happening is:

1. my monitor switches resolution (to 640x480 I believe)...happens on both my PC screen (1920x1200) and TV (1920x1080)
2. the scaled characters' pixels are still noticeably smaller than those of the background (about 1/4, which coincides with my guess of the screen switching to 640x480)

What I believe should be happening is:

1. The screen stays at it's native resolution (i.e. 1920x1080)
2. After rendering the game in it's native resolution (320x200) the engine should upscale the graphics to the screen's resolution

What am I missing? Is it even possible to use character scaling without that "mixed resolution" effect occurring at the moment?

thanks!
daniel
SMF spam blocked by CleanTalk