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

#41
General Discussion / Re: I hate what I do
Wed 26/09/2007 09:49:12
Quote from: vict0r on Wed 26/09/2007 00:23:28
A good psilocybin trip can often offer you lots and lots of new inspiration.
Pleasant to find such open mindness from ags community.  :)

Quote from: ildu on Wed 26/09/2007 09:15:14
If you can't be creative without taking drugs, maybe you should just give up.
'Drug' as a word is quite misleading, that's why i would put drugs and certain natural herbs in completely different categories.
#42
General Discussion / Re: I hate what I do
Tue 25/09/2007 22:50:56
Quote from: radiowaves on Tue 25/09/2007 21:48:28
Except from the last part, I am so definately going to to this! But how can you not fear being robbed in train stations?

Stations witch are open 24/7 are usualy guarded guite well, and like i said, its low-budget travelling, so i dont have much to rob anyway  :)

Its more scary to sleep at parks, in some cities, there might be guite bad guys hanging around, so i wouldnt do that alone.
#43
General Discussion / Re: I hate what I do
Tue 25/09/2007 21:37:27
Have you ever read Somerset Maugham's The moon and sixpence?

But answer to the question,
I find help to boredom from low-budget travelling. Seeing different countries, people and cultures, and sleeping in tent at citypark,in sleeping bag at railway stations or in a forest middle-of-nowhere, eating cheapest but healthy food, jogging at places never seen before. After spending a month in such journey i feel like a completely new person.

If that doesnt help, sell your house and car, go to the nearest casino and put all the money to roulette  :)
#44
Quote from: Pumaman on Tue 25/09/2007 19:52:05
Did you rebuild the room after adding the optional parameters? If not, the room won't have been recompiled to pass in the new default values.

Try a Rebuild All Rooms and see if that sorts out the problem.

Yes, i rebuilt all files and that solved it :)
#45
Quote from: Scorpiorus on Sun 23/09/2007 18:50:42
Hmm... that does seem rather odd. Unfortunately I can't check it myself at the moment, so I don't know if it's a new AGS 2.8 beta's specific issue.

What if you re-declare function parameters as "int" instead of "short", does it make any difference at all?

import static function SetNewChain(int mainchainid, int subchainid, int subchainposition=1, int WhoExecutes =-1);

Yes,  :)
Parameters started to give right values when i did it. It seems like a bug in the editor to me.
#46
I just noticed that SetGameSpeed has nothing to do with the crash. I erased mouse.Mode = eModeWait; from SleepingFunciton to see if mouse freezes when game crashes, and it didnt crash anymore.
  Then i put mousewait line back to function and erased everything else, and game crashed again (but after longer time because gamespeed wasnt at 1000 anymore.)

I tried to set all wait cursors settings (except name) to same as normal cursors settings but game crashed anyway.

edit:

Found the reason:
Code: ags

  // Adds text to 'infotext'.
  if (Mouse.Mode == eModeWalkto) Infotext.Text = "Walk to ";
  if (Mouse.Mode == eModePickup) Infotext.Text = "Pick up ";
  if (Mouse.Mode == eModeLookat) Infotext.Text = "Look at ";
  if (Mouse.Mode == eModeUse) Infotext.Text = "Use ";
  if (Mouse.Mode == eModeTalkto) Infotext.Text = "Talk to ";
  if (Mouse.Mode == eModeUseinv) {
    Infotext.Text = "Use ";
    Infotext.Text = Infotext.Text.Append(item[active_inventory].name);
    Infotext.Text = Infotext.Text.Append(" to ");
  }
  Infotext.Text = Infotext.Text.Append(Game.GetLocationName(mouse.x, mouse.y));


I have this at repeatly execute,  when mouse mode was set to wait, it didnt clear infotext and kept adding locationname to it until it crashed the game. ::)
#47
With different values, first function call gives the right value and second gives a randomnumber near 34000000 like before.
  I also tried "Display ("%d",subchainposition);"  (The third parameter in function) and that gives right value at first call, and value 0 at second call.

Then i erased subchainposition, and whoexecutes started to give value 0 at second call.
So it seems that 3. parameter of function gives always 0 and 4th gives that 34000000. I also added 5th parameter witch always gives 501.  ???
#48
Quote from: Gilbot V7000a on Wed 19/09/2007 11:05:01
Hmmm, what system are you using (like windows version, amount of ram, etc.)?

This may not be related, but just to make sure...

Windows Xp home
AMD Athlon 3200+
512ddr
nvidia geforce fx5500
#49
First place:
CharacterControl.SetNewChain(chr[counter].chainnumber, chr[counter].chainsubnumber);

Second:
CharacterControl.SetNewChain(chr[1].chainnumber, 31);

in both calls paramerer1's value is 2  and at first call parameter2's value is 30
#50
QuoteThe only problem I got was when I tried to sleep twice in a row and got a Divide By Zero error in the script.
This is because "player goes sleep" code isnt ready yet, shoudnt have anything to do with crash.

When it crashes i just press use and then click bed object. it doesnt always crash, but usualy.
when it crashes, "sleepcounter" at middle of the screen is somewhere near 18 seconds.


I dont know if these are the settings editor uses but
this is the acsetup file from the game's_Debug folder:
[sound]
digiid=-1
midiid=-1
digiwin=1096302880
midiwin=-1
digiindx=0
midiindx=0
digiwinindx=0
midiwinindx=0
[misc]
gamecolordepth=16
defaultres=1
screenres=0
letterbox=0
windowed=0
refresh=0
gfxfilter=None


edit:  I downloaded beta10, and now instead of crashing, game just freezes and i have to shut it down with ctrl+alt+del. When ctrl+alt+del is pressed it says the  'program isn't running'  message.  (I dont have english windows but that usual message anyway.)
#51
Quote
Does this happen every time you try to open this room, or did it do it just the once? This is the second time that a crash on opening a room has been reported, but so far I've been unable to reproduce the problem...

It has happend couple times when i have tried open a room (i think it doesnt matter witch room number i try to open). And when i get this error message once, i keep getting it everytime i press any 'edit room' button. But when i save, close AGS and open it again, everything works fine.

#52
Quote from: Pumaman on Tue 18/09/2007 21:37:19
It shouldn't crash without an error message. Is the game small enough to upload for me to investigate?

I sent the link in pm.
#53
Im trying to write a function witch speeds up the whole game at least over 20xNormal game speed. The use of the function would be that when player character sleeps, the game world keeps going normaly (but very fast) at background.
  I have tried simple "SetGameSpeed(1000)" when player goes sleeping and first it seemed to be working fine, but then game started crashing (whitout any errormessage) when this speed is used.
And now it sometimes work and sometimes crashes after about 10secs, even if i dont change anything. Debug shows that fps is somewhere around 400 when it works and around 200 when it crashes.

Can this kind of function be done whit SetGameSpeed() properly? Or is there any other way to do it?

#54
Quote from: Scorpiorus on Mon 17/09/2007 20:42:16
And what is its value then?

You can check it with a Display call just before the if-check:

Display( "WhoExecutes = %d", WhoExecutes );
if (WhoExecutes != -1) ...


First place where i call the function gives -1 as it should be.
Second place gives a random value near 34000000  ::)

EDIT:

First place is inside other function at the "first time player enters the room"-script  of the first room.

second place is at room's "use object" script.

But i cant find any reason why different position in script should affect to 'WhoExecutes' value.

Im using AGS2.8beta9 in case it could be a bug in the editor.
#55
Dunno if this is mentioned before, but AGS crashed whitout any error message when i created room 6 and selected edit room. I had room 5 script open while doing this (i was editing object0's use object event) , but room 5 itself wasnt open.

This error message popped up when clicked edit room.


Error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Version: AGS 2.8.0.9

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at load_room_file(SByte* )
   at load_crm_file(UnloadedRoom roomToLoad)
   at AGS.Native.NativeMethods.LoadRoomFile(UnloadedRoom roomToLoad)
   at AGS.Editor.Components.RoomsComponent.LoadNewRoomIntoMemory(UnloadedRoom newRoom, CompileMessages errors)
   at AGS.Editor.Components.RoomsComponent.LoadDifferentRoom(UnloadedRoom newRoom)
   at AGS.Editor.Components.RoomsComponent.LoadRoom(String controlID)
   at AGS.Editor.Components.RoomsComponent.CommandClick(String controlID)
   at AGS.Editor.ProjectTree.ProcessClickOnNode(String nodeID, MouseButtons button)
   at AGS.Editor.ProjectTree.projectTree_NodeMouseDoubleClick(Object sender, TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.OnNodeMouseDoubleClick(TreeNodeMouseClickEventArgs e)
   at System.Windows.Forms.TreeView.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
#56
Quote from: Rocco on Sun 16/09/2007 17:48:34
thanks for updating this great module.  :)

i have one question:
what is the easiest way, to change walkspeed between chain-commands?
i want to assign a random walkspeed after some walk commands in the chain.


I think easiest way is to use RunScript module (comes with Character Control module).
Add RunScript module BEFORE CharacterControl module in your game.

Script you use inside RunScript module:
Code: ags

   if (parameter1.AsInt == ExampleValue) {
    int WalkingSpeed = Random(MaxWalkspeed - MinWalkspeed) + MinWalkspeed;
    thechar.SetWalkSpeed(WalkingSpeed,WalkingSpeed);
  return 0; 


Then you add to chain a command 'RUN:ExampleValue;' when you want change the walking speed.

Replace ExampleValue with a number 1 or above.
#57
There is a bug when using animated cursors. When you animate cursor by selecting i.e. view 2, cursor uses view 3 when animating. Seems that true view is always one number bigger than selected view.
#58
Im editing strazer's character control module for my own purposes, and I'm trying to add new function to module. But i have problems using optional parameters.

Im importing function in module's header like this:
Code: ags

struct CharacterControl {
	import static function CreateChain(int chainid, String commandstring);
	import static function AppendChain(int chainid, String commandstring);
	import static function GetChain(Character *thechar);
	import static function GetChainPosition(Character *thechar);
	import static function GetRoom(Character *thechar);
	import static bool IsExecuting(Character *thechar);
	import static bool IsPaused(Character *thechar);
	import static function PauseExecuting(Character *thechar);
	import static function ResumeExecuting(Character *thechar);
	import static function StartExecuting(Character *thechar, int chainid, int chainposition=1);
	import static function StopExecuting(Character *thechar);
        import static function SetNewChain(short mainchainid,short subchainid, int subchainposition=1, int WhoExecutes =-1);  
};

My function is the last one (SetNewChain)


And at module script I'm using it like this:
Code: ags

static function CharacterControl::SetNewChain(short mainchainid, short subchainid, int subchainposition, int WhoExecutes) {
CharacterControl_NewChain(null, String.Format("%d", subchainid));
CharacterControl.CreateChain(mainchainid, NewChain);
if (WhoExecutes != -1) CharacterControl.StartExecuting(character[WhoExecutes], mainchainid, subchainposition);
  }


The problem is that  when i use function whitout setting value to optional parameter 'WhoExecutes', if-command at the last line of script is executed even WhoExecutes value should be at -1?
#59
Quote from: Pumaman on Tue 11/09/2007 22:27:36

QuoteI created new game called TestGame using empty template, then I created few GUIs and dialogs and quit whitout saving.
When I opened ags again there was, at recently edited games, three of my old games and a game called a NewGame. I thought the new game was the testgame i have created, so i opened it and it asked for backup copy, witch i didnt take.  But instead of opening test game, ags opened my main game (Now there is two of my main games at recently edited games + my old games). And now i dont have a backup copy of my main game 

Was it just the game name that was wrong, or the folder path as well? Did you open AGS 2.72 in between?


My AGS folders are 'Adventure Game Studio 2.72' and 'Adventure Game Studio 2.8beta9', but because folder paths are so long, AGS's recently edited games shows both folders 'Adventure Game Studio ...'   So cant tell if path was wrong.

And i think i didnt open 2.72 in between. But not really sure about that.
#60
Quote from: SSH on Mon 10/09/2007 08:03:38
CJ, I deleted my old game by mistake. Please can you fix this bug in AGS...? :=

Quote from: Ishmael on Mon 10/09/2007 12:06:09
But still, you're told to make a backup of your game before trying this release. That should be enough... :=

Quote from: SSH on Mon 10/09/2007 13:46:30
Perhaps AGS should just ignore users when they click "No" on the backup dialog?

Quote from: Rui "Trovatore" Pires on Mon 10/09/2007 12:08:30
Anyway, don't the newest betas ask you (and reccomend you to!) whether you want to backup your old 2.7 game, and even do it for you? Hmmm....

But i thought i was opening some unimportat testgame, that's why i didnt take backup.   :)
SMF spam blocked by CleanTalk