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

#1
Quote from: KhrisMUC on Wed 30/01/2008 17:49:21
mchammer: the stuff you posted address something else. (AnyClick isn't called after walkto clicks)

I didnt test it, it's just a quote from old thread and tells how to get AnyClick called after walk to click.


#2
This is from old thread, havent tested it tho so im not sure if it works:
Quote
Yeah, by default AGS won't run anyclick interaction while in walk mode. To change that behavior open the general settings pane and put a tick next to the "Don't automatically move character in walk mode" option. But with that option enabled that player won't be able to move around, therefore to correct it you have to adjust the on_mouse_click function in the global script by putting an explicit code that handles moving:

function on_mouse_click(int button) {
   // called when a mouse button is clicked. button is either LEFT or RIGHT
   if (IsGamePaused() == 1) {
   // Game is paused, so do nothing (ie. don't allow mouse click)
   }
   else if (button==LEFT) {
      if (GetCursorMode() == MODE_WALK) MoveCharacter(GetPlayerCharacter(), GetViewportX()+mouse.x, GetViewportY()+mouse.y);
      ProcessClick(mouse.x, mouse.y, GetCursorMode());
   }
   else {   // right-click, so cycle cursor
      SetNextCursorMode();
  }
}

Code there is bit old, I guess new code would be something like that:
Code: ags

function on_mouse_click(MouseButton button) // called when a mouse button is clicked. button is either LEFT or RIGHT
  {
  if (IsGamePaused() == 1) // Game is paused, so do nothing (ie. don't allow mouse click)
    {
    }
  else if (button == eMouseLeft) 
    {
    if (mouse.Mode = eModeWalkTo) player.Walk(GetViewportX()+mouse.x, GetViewportY()+mouse.y,eNoBlock, eWalkableAreas);
    ProcessClick(mouse.x,mouse.y, mouse.Mode);
    }
  else // right-click
    {
    mouse.SelectNextMode();   
    }
  }
#3
I cant really understand how cursor,button and player sprites and code coud take 1.1gb memory.
Even if you have very very large arrays, it should take much less space. The game im working on right now has 300 arrays with 64000 index (that makes about 20000000 ints) and it's still only 10mb compiled.
#4
Did you paste it into a script header? I get the error by putting that code anywhere into a script header. It doesnt crash if I put the code into a main script.
#5
I got this when I typed wrong brace to an enum and tried to save.
Code: ags

enum CharacterIcons [
};



Error: Index was outside the bounds of the array.
Version: AGS 3.0.0.23

System.IndexOutOfRangeException: Index was outside the bounds of the array.
   at AGS.Editor.FastString.StartsWith(String text)
   at AGS.Editor.AutoComplete.ConstructCache(Script scriptToCache, Boolean isBackgroundThread)
   at AGS.Editor.ScriptEditor.SaveChanges()
   at AGS.Editor.Components.ScriptsComponent.BeforeSaveGame()
   at AGS.Editor.ComponentController.NotifyAboutToSaveGame()
   at AGS.Editor.ApplicationController._agsEditor_PreSaveGame(PreSaveGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.PreSaveGameHandler.Invoke(PreSaveGameEventArgs evArgs)
   at AGS.Editor.AGSEditor.SaveGameFiles()
   at AGS.Editor.Components.FileCommandsComponent.CommandClick(String controlID)
   at AGS.Editor.ToolBarManager.ToolbarEventHandler(Object sender, EventArgs e)
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.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)


Ps. Great job with 3.0  :)
#6
Quote from: KhrisMUC on Wed 23/01/2008 20:52:37
unless you're talking about slight variations in phrasing

Yes, slight variations would be easier to do by scripting, but it would also make possible to add things like player's name, or something player has written to a textbox, into dialog option texts.
#7
Would be nice if you could change dialog option texts in-game.
Something like Dialog.SetOptionText
#8
General Discussion / Re: What's your game?
Mon 14/01/2008 14:54:01
Quote from: Babar on Mon 31/12/2007 14:26:36
Colonization! That is my game, insofar as I have a game. Every few years I go at it hardcore for about 12 hours at a time, and usually end up getting a fruit or vegetable named after me.

Either that, or minesweeper :D

I used to play this again and again, but I havent found version witch works with my new computer  :(

Game I have played for long time is of course nethack  :)

I also have played civilizations 2-4, but i dont play them that much anymore because i dont like the new 3d graphics of civ4.
#10
General Discussion / Re: Discuss about drugs
Tue 27/11/2007 20:12:44
Quote from: lo_res_man on Tue 27/11/2007 18:11:35
And casinos ARE blood money. Much of the money from gambling comes from problem gamblers, people willing to sacrifice jobs families and lives for their addiction.

I dont see it like that. Almost every entertaiment has it's problem users: Casinos, junk food (fuck mcdonalds), drugs,alcohol,cigarettes,computers, tv...
We can't ban all this just because there is and will always be people who just cant control themselves and dont understand that one key to good life is moderation.
#11
Was bored today so started to plan an adventure game about the subject.
Doesnt it sound great...  ::)

Btw, went little off-topic, so renamed the whole thing.
#12
Quote from: Nightfable on Wed 21/11/2007 22:43:03
Ahhh... yes, I see. But if you've have to choose between a female or a male going through some hardships, wouldn't most rather see the female than the male? Don't they show more women victim in

Well.. kinda yes,
but at least for me it's not because I'd love to see women suffer. I just feel more sympathy towards women than men. But i dont know if that's because im a man myself.

Btw I just red Alexandre Dumas Jr's Camille. Great book and fits well to topic  :)
#13
Quote from: Nightfable on Wed 21/11/2007 22:10:06
hero going through hardships and obstacles and somehow overcoming them

Can't you find this plot from every book/movie/serie.  :)
#14
That is why I pay attension to these:

Quote from: mchammer on Sun 18/11/2007 19:48:13
-right dozing (not too strong for first time)
-setting(warm homelike atmosphere,good lighing, relaxing music (there is shamanic music made just for tripping))
-you never should try them alone.
-noise (caused by enviroment or drunken friends) can be really pressing.
-you should try them indoors. (There is different opinions about that tho)
-you should have an empty stomach when eating them.

Also i make it sure that im not too stressed or going trought some depressing issue when i eat those.
I have always eaten them with very good and trustworthy friends.

Stupot told about his bad trip, of course i cant know all the reasons witch caused it, but things what he told are for sure enought to cause a terrible trip to anyone:
Quote
a) I was inexperienced. I don't even smoke weed let alone eating psychedelic fungi so it probably wasn't the recommended 'first drug'.
b) I was sitting in a room with about 3 or 4 kids that used to bully me a few years previously... they were ok with me then, but I still have harsh memories of them.
c) I took too many, because I didnt wait long enough for the first load to settle in and gobbled up some more impatiently.  This turned out to be a bad move.

Of course there is always a risk for bad trip, i have never had a very bad trip and i try to make sure with these preparations that i never need to experience one. If i keep eating shroom trought my whole life, i probably will have a very bad trip some day. Do I keep eating shrooms after that, i cant really know. Believe me, i have compared the risks and benefits very carefully, and result is that i have that my little habit.
#15
I dont really know what part you didnt understand...
Ill try to make it simple.

I have tried these two:

A) I dont eat shrooms at all.

B) I eat them couple times a year.


1. I have noticed that im happier while doing B instead of A.

2. I have also noticed that you are happier if you pick option A.
That's because we think in different way and like to do different things.

3. I dont make other people's life unhappier while doing B. (It seems to make you angry tho, but
i can live with that)
#16
Quote from: EldKatt on Wed 21/11/2007 16:37:42
Don't expect anyone in the internet to be convince.

Idea  of this tread was to discuss about new law, not to turn people to use shrooms or something like that. It just went little off topic.

About that wisdom/understanding/whatever....  I dont mean that eating mushrooms would increase wisdom or that they contain some kind of magical intelligence. I mean that under shroom trip, I think in different way than usual. So it doesnt make me instantly thinking smarter or anything. But seeing everything from different angle has made me notice a lot of things about people and their way to think and reasons why they behave like they do. That has made me more open person what i used to be.

And notice that i eat muhrooms only couple times in a year (in finland those grow about 1 - 2 months every autumn), so im not addict or anything like that. I just feel that this habit is mentaly good for me and that's the only reason i do it.
#17
1. Torin's passage
-If i played it today first time, i maybe woudnt like it that much, but it was the first adventure game i ever played  :)

2. Loom
-Its a pity they never finished the trilogy...

3.MI 1

4.MI 2

5.The Ur-Quan Masters
-I would put it in adventure games category  :)
#18
Quote from: Nacho on Mon 19/11/2007 14:03:41
Comparing the benefits of sport and its risks with using drugs... amazing! ^_^

Tell me, what you know about the risks or benefits exactly?

I dont mean that there is no risks, of course there is, bad trip can be very very terrible experience.
But have you read a lot about drugs?
You just keep saying that drugs are only bad thing and people who dont think like you are boring nolife losers (and yes, i know you didnt say exactly like that but that's not important). How you know something what you have never tried or experienced is so bad thing? I dont
say you should try them, because you obiviously shoudnt, but why you cant accept that some people like to do different things than you?

Peace :)

#19
Quote from: Radiant on Sun 18/11/2007 22:08:17
Quote from: mchammer on Sun 18/11/2007 22:04:26
People who havent tried it can easily claim that people who eat shrooms are just hallucinating so strongly that they think they have seen something wise. I can say that's not true but of course i have no way to proof it in internet. Only thing i can say is that read about people's experiences.

I'm sure that some people who take shrooms have a marvelous learning experience. It does not follow, however, that all (or even many) people who take shrooms have such an experience.

It's difficult for me to think that people wouldn't get such an experience. Of course wrongly used or if you arent strong minded (I dont mean that there are 'strong minded' and 'weak minded' persons, i just dont have better word for it) the experience can be very scary and bad, but i have never heard that anyone would think it wasnt learning.
#20
Quote from: Nacho on Sun 18/11/2007 21:12:11
Jumping from the 10th floor of an skycrapper might help you to see the life from a different angle, and it might not be very recommendable. I' ve read here some of the most used topics about drugs, and they still sound like crap to me.

Quote from: mchammer on Sun 18/11/2007 19:48:13
Even if there is no scientific proof that shrooms cause any psysichal damage,
they can freak you out if you use them wrongly (or if you have schizophrenia).

If millions of people eat substance witch changes your state of mind, everyone can understand that
bad things will happen to someone. But if you pay more attension to statistics, you can see that
deaths caused by mushrooms are very rare (and most of them are caused by eating wrong mushrooms).
And if you compare that to deaths caused by alcohol...

Quote from: Nacho on Sun 18/11/2007 21:12:11
Shamans have used them for 10000 years!

And? Have they seen something interesting? No... basically they were drugged people. No one has seen the cure for cancer after eating a mushroom.

Cure of cancer? No, shrooms dont turn people into scientists. (They might have saved me from cancer tho because i quit drinking and smoking after first trips i experienced.)

But have they seen something interesting?  Short answer would be yes.

Quote from: Radiant on Sun 18/11/2007 21:16:01
That's a nice romantic notion, but that hardly applies to everybody. Effects are highly subjective and personal; I am reasonably certain that most people do not take drugs to learn about the world, and also that this doesn't actually work that way for many.

I know it sounds like 'a romantic notion'  :).   And yes, there is people who misuse shroom-alcohol combination as 'a partydrug' but usually that kind of people uses strong drugs like extacy,cocaine,heroin or amphetamine.

People who havent tried it can easily claim that people who eat shrooms are just hallucinating so strongly that they think they have seen something wise. I can say that's not true but of course i have no way to proof it in internet. Only thing i can say is that read about people's experiences.
SMF spam blocked by CleanTalk