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

#1
AGS Games in Production / Re: Neofeud
Tue 23/06/2015 12:04:01
Lookin' great SilverSpook :D Sorry that I've been a bit AWOL on this site as well. Last time i logged in was when i was asking questions about scripting code for the FIRST version of the game. Before unity and regression back to AGS. I'm looking forward to testing the demo. :D

P.S. I will be updating this account name from my old ModDB and IndieDB account name Dentonoid to my current one right after this post.

Take care,
--AlphaCodeOverride
#2
Figured it out!!! I renamed my song Music0. I found a page explaining that the MUSIC0 song is the one which plays at the beginning of the game, with or without the PlayMusic command. So I didn't need to set it up in Room 1: it played automatically. :D Thanks for your guys' help with the scripting though, I really appreciate it. :)
#3
well i fixed the code, and got the game to run but the music is not playing. I tried converting it from mp3 to wav with no luck.
here's the code i used to get the game to run:

function on_mouse_click(MouseButton button) {
    // called when a mouse button is clicked. button is either LEFT or RIGHT
   if (mouse.Mode==eModeWalkto && IsKeyPressed(eKeySpace) == 1) {
   //if Walk cursor is selected and player is pressing the spacebar
      if (mouse.IsButtonDown(eMouseLeft)) {
      }
   }
  //if player presses left mouse button
    player.x=mouse.x;
    player.y=mouse.y;
    player.PlaceOnWalkableArea();
  //make cWoman coordinates the mouse's current coordinates
  //AND place her on nearest walkable are
}
function room_FirstLoad()
{
aSendenwerk.Play();
}

Heck i even tried changing it to this

}
function room_FirstLoad(){
Display("The current room plays music %d when the player enters.", Room.MusicOnLoad);
aSendenwerk.Play();
}

I have my music in both my game folder as well as in the music folder which i had to create seeing as how i couldn't find an already made music folder. and it does the same thing when i load from either folder
It did however create an audiocache which when i play it it is my song.
#4
ok, i'll try that it's just that the whole bracket thing confuses me a bit.
#5
Thanks!! that fixed that issue but now i'm having trouble with adding script for music. it keeps telling me unexpected PlayMusic or if i try it the other way it tells me unexpected aMusic1.play. I tried it in the room as well as globals scripts and they say the same thing. I am very new to scripting and haven't gotten the hang of it yet.

Heres the global script. one way

function btnDeleteSave_OnClick(GUIControl *control, MouseButton button)
{
  if (lstSaveGamesList.SelectedIndex >= 0)
  {
    DeleteSaveSlot(lstSaveGamesList.SaveGameSlots[lstSaveGamesList.SelectedIndex]);
    lstSaveGamesList.FillSaveGameList();
  }
}

function iKey_Look()
{
  Display("A little yellow key.");
}
PlayMusic(1);
{

here it is the other:

}
}

function iKey_Look()
{
  Display("A little yellow key.");
}
aMusic1.Play();
{

and the room script one way:

// room script file


function hHotspot1_Look()
{
   Display("A lovely young debutante enjoying the night air.  Pristine at this celestial altitude.");
}

function oKey_Interact()
{
    oKey.Visible = false;
    player.AddInventory(iKey);
    GiveScore(5);
}

function hHotspot1_WalkOn()
{
    cEgo.ChangeRoom(2, 300,  700);
}
function on_mouse_click(MouseButton button) {
    // called when a mouse button is clicked. button is either LEFT or RIGHT
   if (mouse.Mode==eModeWalkto && IsKeyPressed(eKeySpace) == 1) {
   //if Walk cursor is selected and player is pressing the spacebar
      if (mouse.IsButtonDown(eMouseLeft)) {
      }
   }
  //if player presses left mouse button
    player.x=mouse.x;
    player.y=mouse.y;
    player.PlaceOnWalkableArea();
  //make cWoman coordinates the mouse's current coordinates
  //AND place her on nearest walkable are
}

aMusic1.Play();
{
and the same way with PlayMusic(1);
#6
here's the whole room script in case that wasn't enough info.

// room script file


function hHotspot1_Look()
{
   Display("A lovely young debutante enjoying the night air.  Pristine at this celestial altitude.");
}

function oKey_Interact()
{
    oKey.Visible = false;
    player.AddInventory(iKey);
    GiveScore(5);
}

function hHotspot1_WalkOn()
{
    cEgo.ChangeRoom(2, 300,  700);
}
function on_mouse_click(MouseButton button) {
  // called when a mouse button is clicked. button is either LEFT or RIGHT
if (mouse.Mode==eModeWalkto && IsKeyPressed(eKeySpace) == 1) {
   //if Walk cursor is selected and player is pressing the spacebar
    if (mouse.IsButtonDown(eMouseLeft)) {
   //if player presses left mouse button
    player.x=mouse.x;
    player.y=mouse.y;
    player.PlaceOnWalkableArea();
   //make cWoman coordinates the mouse's current coordinates
   //AND place her on nearest walkable area
      }
}
#7
Hi, after getting one problem sorted i ran into another. I have a piece of script i am trying to utilize in my game and it keeps telling me i have an open or missing function. no matter what i seem to do it keeps telling me this. any help in discovering my flaw would be appreciated.

Here's the script.

function on_mouse_click(MouseButton button) {
  // called when a mouse button is clicked. button is either LEFT or RIGHT
if (mouse.Mode==eModeWalkto && IsKeyPressed(eKeySpace) == 1) {
   //if Walk cursor is selected and player is pressing the spacebar
    if (mouse.IsButtonDown(eMouseLeft)) {
   //if player presses left mouse button
    player.x=mouse.x;
    player.y=mouse.y;
    player.PlaceOnWalkableArea();
   //make cWoman coordinates the mouse's current coordinates
   //AND place her on nearest walkable area
      }
#8
got it working now. Thanks for your help Gurok!! :D
#9
the speech shows up next to a picture of the woman on the left of the screen, but it's not showing the portrait i want it to show. This is one of my dialouges, my hotspots use Display() with quotes but i make actual dialouge which i will do voice speech to later.

Ego: "Hello!"
Woman: "Hi there."
return
@1

Woman: "Nothing much."
return
@2

Woman: "Wouldn't you like to know."
goto-dialog dWoman2
@3

Woman: "Goodbye."
stop
#10
I got all that done but when i run the game it doesn't show up.
#11
not sure how to create a view with the portrait. do i insert it as an object or something else? because there is no view in the properties at all and no way to match the frame with the object that i can find. oh and i might add that the character that the portrait is attached to doesn't move. I created a view and set it to frame 0 because View 2 which is the characters view won't let me scroll up frames so i assume that frame 0 is the only frame for it since it doesn't move. also i might add that cEgo also has a frame 0 so won't they conflict?
#12
Hi, I'm new to this forum, and Semi new to AGS, and if I'm on the right part of the forum, I have a possible scripting question.

In the game I'm helping to make, I need to get a picture of the face of the person i am talking to to show up next to the person when the actual person is clicked. I assume i can make this happen by inserting the face picture as an object and making it a hotspot that is hidden until an interaction is made such as clicking on the person, but i don't want it to go to inventory AND i DO want it to dissapear again when I'm done talking to that person. Kind of like some of those games where the face of the person you talk to pops up when you're talking to them and goes away when you're done like the infolink in Deus Ex for an example. My question is, is it possible to do this in AGS and if so, how do i do it in scripting?
SMF spam blocked by CleanTalk