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

Topics - BrightBulb

#1
I'm aware how it's possible to play sounds with the command aSound.Play with aSound being the name of the audio file to be played.

Is there a way to have the command play a certain audio file by just supplying a variable?

Example:
For a RPG I made a struct for all the items in the game that handles all the items' properties like names, graphic, cost etc. I'd like to make a new entry for the struct to store a specific audio file for each item that I can later play by referring to the structs audio variable.

#2
Hi everyone,

I got the above error message with a very complex if expression with a lot of long variable names. There is no problem with the brackets. The line is just too long.

Is there any solution to this?

Thanks.
#3
Hi there,

I have scripted a fighting sequence like the boxing fights in Fate of Atlantis. It works, but know I've noticed a problem.

If I use blocking animations, it makes the controls sluggish.

If I use non-blocking actions, the animations are not visible.

Is there a solution for this?

#4
I consider the 9-Verb-Gui as clumsy and not very user-friendly. Personally I prefer a Left-Click = interact, Right-Click = look gui.

I was wondering how people would react to an Indiana Jones Fan Game without a 9-Verb-Gui. Would it violate expectation too much?
#5
Hi everybody,

yesterday I just wrote a short programm to help me calculate the odds of dice rolling. As this is all the programm should do I did not concentrate on good scripting and just went using nested loops for each dice. The problem ist that I exceed the loop limit using more than 6 dice. Is there a quick way around this?

Thanks.
#6
Hey everyone,

is there a way to replace for example if (A==1 && (B!=1 || B!=2 || B!=3) with something shorter?

I tried if (A==1 && B!= (1 || 2 || 3) but unfortunately it does not work.

The reason I ask ist that in my script it's of course not just A and B but something much longer so that it would make it much easier to read if I don't have to repeat the variables (B).
#7
What would be the best solution for a inventory where items can be freely moved around in emtpy slots?
The main problem with the normal inventory window is that I cannot check for clicks on empty slots.

My ideas so far:

1. Using buttons. But that would be alot of them.

2. Filling up empty slots with dummy items. But only a workaround.

3.??

#8
I got yet another problem.

I have an inventory window with items 30x30 which are divided by a 1 pixel gap. Since there is no possibility to acount for that gap, I increased the size of the items to 31x31 by adding transparent pixels. Still the items are treated as being only 30x30, thus they overlap by 1 pixel.

I tried to make the color solid instead of transparent, therefore really increasing the size, but it made no difference.
#9
Hi everyone,

I made two GUIs with a button each. I copied (exported) the first GUI to make the second one, as all the functions are the same. The problem now is that the button from the first GUI works normally, while the button from the second GUI, which is linked to the same script does not react at all.

The two GUIs are identical (both are clickable). I also tried linking the second button to its own script, but it just doesn't react. My only guess is that it has something to do with the exporting and importing, but that would be a bug then.

Any ideas?
#10
Hello everyone,

I was wondering what would be the best way to script an Eye of the Beholder / Lands of Lore / Dungeon Master Clone. Specifically I have following questions:

1. How would I organize the data from a maze? That is where walls, items or monster are? Some sort of struct array?

2. What would be the best way to display the dungeon? Using a room with a lot of objects for all the walls, items and monsters?

Thanks.

#11
Hi everyone,

simliar to Lucasarts games I have a status line that shows what is currently under the cursor and which action will be executed on mouse click (i.e. open door when cursor is over a door). When a (blocking) action is executed the mouse cursor dissappears (which is fine).

Now what I want is to make the status line invisible as well, as long as the (blocking) action is executed. I tried checking mouse.visible=false but this seems only to work if set manually.

Any ideas?
#12
Hello everybody,

I'm trying to script the following: The player can talk to another character (works fine),and when he selects a certain dialog option I want the player to regain game control (usually a player has no control during dialogs) and his dialog partner should continue talking for a while.

I have two problems with this:

1. When running multiple saybackground lines only the last one is shown (even with bgspeech_stay_on_display=1).

2. For the player to be able to act I need to end the dialog and then run the saybackground lines. Now I need a way to either run these commands immediately after ending the dialog OR a way to end the dialog from the global/room script rather than the dialogscript.

Any ideas?
#13
Hi everybody,

I wanted to facilitate gameplay by marking all hotspots & objects of a room with a red cross (for example) when pressing a certain key. Now I am aware of some script by Proskrito, but I wanted it to be in real time with the possibility to be turned on all the time without having to press a key.

The only solution I've come up so far is to create objects (as a red cross) to place over all the hotspots & objects. But with the object limit in rooms this doesn't seem very practicable.

Is there perhaps another solution?

Thanks
#14
Hello everybody,

I'm making a simple graphic adventure and came across a problem implementing a score system.

For doing stuff you get points and your score increases. Now, when you get stuck in the game you can ask your sidekick for advice, but this imposes a score penalty. So when you beat the game without any help, your score is higher.

Now it's fairly easy for a player to avoid this penalty by saving the game, ask for advice and restore the game. I wanted to prevent that. So the goal is for the penalty to stay effective even after a reload.

My first try was to save the currentscore in an external file using read/write int. But the problem with this is that a player gains and loses points twice when playing the same situation twice. For example, player asks for advice and gains -10 points for a total of -10 points, these points are saved, so that even after a reload his score is -10. But if he asks for the same advice again he will gain another -10 points.

Anybody with some ideas?

#15
Hi everybody,

I have this piece of code which draws a selection frame around the selected inventory item (lucas style).  Basically I'm running a counter from 0 to 13 checking against 14 buttons and on a match highlight the selected inventory item. It works fine but obviously one could shorten it.

If I could do something like bInvSlot[counter].Visible=true; then it would save 13 lines. But I wasn't able to implement it. I suspect one could do it with pointers/arrays, but I couldn't find anything.

   
Code: ags
  while (counter<MaxItems){
              
              
                if (player.ActiveInventory == InvWin.ItemAtIndex[counter]) {
                if (counter==0) bInvSlot0.Visible=true;
                else if (counter==1)bInvSlot1.Visible=true;
                else if (counter==2)bInvSlot2.Visible=true;
                else if (counter==3)bInvSlot3.Visible=true;
                else if (counter==4)bInvSlot4.Visible=true;
                else if (counter==5)bInvSlot5.Visible=true;
                else if (counter==6)bInvSlot6.Visible=true;
                else if (counter==7)bInvSlot7.Visible=true;
                else if (counter==8)bInvSlot8.Visible=true;
                else if (counter==9)bInvSlot9.Visible=true;
                else if (counter==10)bInvSlot10.Visible=true;
                else if (counter==11)bInvSlot11.Visible=true;
                else if (counter==12)bInvSlot12.Visible=true;
                else if (counter==13)bInvSlot13.Visible=true;
                }              
                
              counter ++;


Thanks.
SMF spam blocked by CleanTalk