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

#1261
a comment to make and a question.
Comment: Something you could try is separate the if statement onto 2 separate lines like this:
if (surface.GetPixel(cx, cy) == c[n])
    surface.DrawPixel(cx, cy);

Then put a breakpoint on the surface.DrawPixel function so you could tell if the if statement is EVER true. Might help you narrow down the problem.

Question: If the loop takes (lets say 2 seconds to run), during those 2 seconds does the game lock up or does it continue to redraw the screen. If so would that mess up the "surface" object?  I am not that familiar with GetPixel and DrawPixel but wondering what happens when loops take too long for the program to refresh the screen at 40 frames per second.
#1262
I don't think the problem is with the code itself, but the fact that it would be incredibly slow. It would probably take more than a minute to process the loops on a slow machine. It would have to execute the "if (surface.GetPixel(cx, cy) == c[n]) surface.DrawPixel(cx, cy);" line 64,000 times. I don't know how fast that line can execute but it could be long enough that it can't complete the loop 40 times a second (The refresh rate of the game).
#1263
What Retro Wolf said should work depending on what you are needing. All I have to add is if you want to do this at the start of each game I would put it in the game_start function.
#1264
I was faced with that same thing once. I created a graphic that had the text on it and just used the graphical functions.
#1265
Of course you would want to do it after the interaction was successful, but all I was saying that setting player.ActiveInventory = null would do the same thing as setting the mouse cursor back to the default cursor.
#1266
In the code that processes each inventory item just add a line to set the mouse back to whatever default cursor you want.
#1267
I started with searching images in google. Then select some images from there. Don't need to worry about copyright as long as your doing it as a learning experience and not looking to sale what you create. For characters search for "sprite animation" in google images.
OR
Use a paint program to create your own. I like Gimp myself.
Paint Programs - http://www.adventuregamestudio.co.uk/forums/index.php?topic=32234.msg416192#msg416192
#1268
My laptop has integrated Intel graphics and Windows 10 and I haven't had to do anything to get AGS to work yet.
#1269
I may be totally off base but if you really just want it to run once during the whole game then Crimson Wizard's would work great since that is what DoOnceOnly was created for, but why are you doing this code in the RepExec function.
How about in the dialog code for option 1 you turn on option 2 and 3, and the dialog code for option 3 you put your walk command.
#1270
If you use Sierra style there is a setting to draw a background around the speech. I am sure it can be done but it would take a lot of scripting to do it using Lucas style speech. Might require you to write your own say command and use extended functions.
#1271
His original question was having different speeds for left than right. not changing it mid-walk, so unless the original question was changed mid stream it does make sense.
#1272
1. i would shorten it even more but this is not your problem.
function oClosedHotelDoor_Interact()
{
  cBingo.Walk(590, 450, eBlock, eWalkableAreas);
  oClosedHotelDoor.Visible = false;
  oOpenHotelDoor.Visible = true;
  oGum.Visible = isgumondoor;
}

2. I am guessing that the problem with the gum not showing up is the baseline. Be sure the baseline for the gum is lower (higher number) than the one for the door. ie. Set the baseline for oOpenHotelDoor is 0 and then the baseline for the gum is 1.
Question: can the player walk behind the open hotel door? If so then you may want to leave the baseline for the door alone and set the baseline for the gum to be one more than the StartY of the open hotel door.
#1273
You can have unlimited numbers of views (animations) however there is a 30000 limit on sprites. (thats a lot of sprites, but if the average animation is 10 sprites that would be about 3000 animations)

The limits I know of (and it may be out of date) is http://www.adventuregamestudio.co.uk/manual/   then expand "Reference", then select "System Limits".

A Sprite is any graphic image other than room backgrounds. This includes images of inventory items, graphics used in gui's, animation frame graphics, and even mouse cursors.

#1274
If you are able to find the place in the code where you will be able to store the walk target coordinates then just set the walk speed there before the walking commences and you would not need to do any of this other stuff.
#1275
I may be wrong but if you stop the character from moving then start them moving again they will restart the animation loop over again. If this is happening in the RepExec function then it will be doing this so you will never see beyond the second frame of the animation loop. If that is the case then you probably want to change your check to see if anything needs to be done to be something like
if (cCharacter.Loop == 2 && cCharacter.WalkSpeedX <> 2)
{
    ....
}
Also you will need to have it start walking again after you have set the walk speed so not sure how you can determine where the player wanted the character to walk to.
#1276
this may be a dumb question but your call to btnOpenInventory_OnClick calls a function called show_inventory_window.
Have you verified that "show_inventory_window" displays gInventory?
#1277
Not sure if this is your issue or not but if you save your game then make changes to the game your save file is not valid anymore. This has to do with the save file saving different information so it gets out of sync.
#1278
I would put a breakpoint on line 5 in option 1. dDocInterview.SetOptionState....
then run the program and see if this line is even called.
If so then there is something wrong with the call. If not then there is something wrong with the array being passed in is not the same array that was set in the other dialog. This would at least narrow down where the problem lies.
SMF spam blocked by CleanTalk