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

#1
damn it, I was so close, I was just playing around with this code, I used for a hotspot to change the cursor
Code: ags

if (Hotspot.GetAtScreenXY(mouse.x, mouse.y) == hkitty){
Ã,  mouse.SaveCursorUntilItLeaves();
Ã,  mouse.Mode = eModeklo;
Ã,  status = String.Format("go to @overhotspot@");
Ã,  aaa.Text = status;}


Well, but now it's pretty much done. I just need to figure out some minor tweaks and it'll be done. Thanx really much. I'm not sure, if I'll try the thing with the room-mouse-click-scripts, as long it works quite well now, but I definetly look it up.
thx again!
#2
well, it's me again, with another problem I can't solve. I tried around, I searched the help (manual), I searched the forum, but I couldn't figure it out.
The code is still the same from above. What I need now, is an exeption around here:
Code: ags

else if (mouse.Mode == eModeInteract) {
Ã,  Ã,  Ã,  Ã,  player.Think("I can't reach it");
Ã,  Ã,  Ã,  Ã,  return;


whenever my player tries to interact with anything, "I can't reach it" appears. Thats fine so far, but he muste be able to interact with one single object.
I thought about different ways to make that work, but none of it turned out to be usefull in the end. By the way, I'm not that good in scripting yet.
My ideas were
- to somehow export the name of the scriptname of the object (oBox) from the roomscript to the globalscript. I found an thread, where someone wanted to do the same, but he was told, it wasn't that easy.

Code: ags

else if (mouse.Mode == eModeInteract) {
Ã,  Ã,  Ã,  Ã,  if (mouse.IsButtonDown(eMouseLeft)==oBox) {player.Think("haudidaudi");}
Ã,  Ã,  Ã,  Ã,  
Ã,  Ã,  Ã,  Ã,  else {player.Think("I can't reach it");
Ã,  Ã,  Ã,  Ã,  return;}
Ã,  Ã,  Ã,  }




- add an action (run script) to the object in the room that sets a variable

something like this
#roomscript
any click on object --> set variable to 1

#global script
Code: ags

else if (mouse.Mode == eModeInteract) {
Ã,  Ã,  Ã,  Ã,  if (variable==1) { player.Say("shubidubidoo") }
Ã,  Ã,  Ã,  Ã,  else {player.Think("I can't reach it");}
Ã,  Ã,  Ã,  Ã,  return; }


I had some more, but I better not post'em if I intend to not make a complete fool of myself ;-)


Is this even possible to do? Am I heading the complete wrong direction?

once again, the player is trapped and shouldn't be able to move or interact wiht anything BUT this one object and the inventory objects.
pleeeeeaaaase help me out once again. This animation is too sweet to be buried now.
#3
great! thanx. Thats what was missing. Now everything works like it should. And thx for the hint with the braces, I already knew it, but I keep forgetting to use it that way.
#4
hey, I try around a little and this is how far I got :

#sectionstart on_mouse_clickÃ,  // DO NOT EDIT OR REMOVE THIS LINE
Code: ags


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 (trapped){
Ã,  Ã,  if (mouse.Mode == eModeWalkto) { player.Think("I'm stuck");}
Ã,  Ã,  else if (mouse.Mode == eModeLookat){player.Think("I can't see nothin'");}
Ã,  Ã,  else if (mouse.Mode == eModeTalkto){player.Think("Hello? Anybody there?");}
Ã,  Ã,  else if (mouse.Mode == eModeInteract){player.Think("I can't reach it");}
Ã,  Ã,  else if (mouse.Mode == eModeUseinv) {
Ã,  Ã,  Ã,  Ã, if (player.activeinv == 3) {player.Think("Tataaaaaa");}
Ã,  Ã,  Ã,  Ã, else {player.Think("I don't think this would help right now.");}
				 }
Ã,  Ã,  Ã,  Ã,  }
Ã,  Ã,  


so far so good. But the player still does the old actions after the message has been dislplayed.

for example:

Before he was trapped you could click (look-mode) on the carpet and he would walk up to it and say "that's a nice carpet". If you do this now, while he is trapped, he will think "I can't see anything" and then walk right up to the carpet and say "that's a nice carpet".Ã,  how could I make him unable to walk and stop these options like the one with the carpet?
I thought about removing the walkable areas and changing his view, but I guess he'll still walk up to the carpet and talk...

any suggestions? ???
#5
hey sorry for my late reply. I was sick and couldn't get myself to work on the game. thanx for your answer, I guess this is the better way to do this. I included the code in my scripts and it worked, but I still don't understand or know how to check which actions are available.

for example: the player shall just able to interact on a electric wire.
on all other hotspots and object the message "I cannot reach it" be displayed. The player should also not be able to walk around or say things about the stuff he looks at, because if he does that, he automaticly gets in the talking-view.
could anybody give me some sort of help there?
I know it's probably a little much to ask, but I think if I'd just undestood how it works, I could get the rest going.
thx for your help in advance
#6
so I've done a little work. here are some new rooms.


my old sleepingroom


my new sleepingroom


my old bathroom


my new bathroom


my old attic


my new attic


the kitchen without ceiling and without lights


the kitchen without ceiling and with lights

I'm not quite sure which kitchen to take...
I've done some more rooms already, but I guess this is enough for a while
#7
hi folks,
I'm trying to make a sequence, where something drops on my player, and he shall be unable to move or interact with other hotspots, objects, etc. in the room. all he should be capable of is moving his hand. In monkey island 2 is a very similair situation, when guybrush gets caught in lechucks hiding place. Later on, he and wally are hanging over some kind of acid. That's pretty much what I want.
I could solve it with setting a global int, which changes, if a certain action (which causes the thing to drop on my player) is done. This global int could then be a conditon to interact with objects etc in this room. and I'll have to remove the walkable areas and change the players view.

I'm pretty sure, all this would be no problem, but , I wonder if there ain't an easier way to do this. Any suggestions? maybe a little trick, which makes the player unable to move or interact with anything but some choosed combinations.
I'm thankful for all I can get
#8
The hotspots are in different places and different rooms.
Wouldn't checking mouse-coordinates cause problems then?
I guess U meant something like this, right?

Code: ags
//function repeatedly_execute 

if (((mouse.y > 100) && (mouse.y<120)) && ((mouse.x > 70) && (mouse.x<90))) {Ã,  SaveCursorForLocationChange();
SetMouseCursor(10);
}

that couldn't be adjusted to different rooms.
I'm not sure if I understood U right and if this code is even functional.
could you post your idea for a code?Ã,  ???
greez dude

ok, forget what I wrote above!

you were right.
room-->room interactions--> repeatedly execute-->

Code: ags

if (Hotspot.GetAtScreenXY(mouse.x, mouse.y) == hkitty){Ã,  Ã,  //my hotspot is named "kitty"
Ã,  mouse.SaveCursorUntilItLeaves();
Ã,  mouse.Mode = eModeklo;}Ã,  Ã, // change to your special cursor-mode
#9
I really want to add this effect only to a few hotspots. These are special hotspots and the cursor should change to a very rare used graphic. I wouldn't even know, what code to post. As I said, the code above does what I want, but it seems to be not exactly the right way, since the new cursor isn't functioning  too well. but thanx for the reply. I'll check if I can use some of the code U mentioned
#10
hey folks, I was searching the forum for a little porblem I have.
I want to change the cursor while it is ON the hotspot.

I used this code

// script for hotspot1: Mouse moves over hotspot

SaveCursorForLocationChange();
SetMouseCursor(10);

but it just works sporadicly. sometimes I really have to move around on the hotspot until the cursor changes and sometimes it doesn't change at all.

I thought maybe the "Mouse moves over hotspot" is not precise enough.
is there another way, to do this?
#11
so now this is the final cut.



@ProgZmax
how exactly did you do this thing with the couch? couldn't figure it out.
#12
@ProgZmax
thanks really much. My room didn't seem to have any vanishing point at all. that's why it looked so odd! I'm goona smooth some stuff over and will find a solution for the kitchen, because one more door (to one last room) has to fit in). the ceiling was dark before, I just forgot to darken it again after I remastered the carpet and stuff.
thanx really much!
#13
hey, its me again. I worked my ass off, to get the room look good, but I can't get it right. I remastered the couch, worked out the edge below the window, changed the door and the carpet, but it just keeps on getting worse. can anybody help? what am I doing wrong?

#14
hey folks, I haven't quite come to finish the room above, because the couch seems to be a little more tricky that I thought. I never get the light and shadows right.
but here is a new room. I haven't come to add most of the shadows yet, and lots of lines aren't smoothed over.so please don't remind me of doing that.
what do you think?




and...here is how far I got with the room above

a had to remove some layers. of course they will be replaced after the errors are fixed. but what do you think about the new texture of the carpet?

#15
hey, wow.
first of all thank all of ya for the feedback. I'll try to rearrange some of the shadows, will try to fix the floor near the kitchen and soften the gray rectangle below the window. the couch and the plant look like from "the sims" because I used graphics of sims as model. I didn't think that the resemblance would be that big.

I post images in jpeg on purpose.

I'll try to post some more images of other rooms soon.
but thanks very much so far
#16
Hey folks I just need your opinion on a room of my new game. I was quite far in developing, but since I was taking a rather long break and having to adjust my functions to the new scripting style I thought, I might as well style up some rooms. This is the second room. what do you think? lights, shadows, colours...be honest...

#17
I'm not sure how to realize this. Are you sure that the effect would be the same?
Once again, I was trying to let an animtion in another room play while my character is idle.

Pretty much like in ZackMcKracken: The character walks out of the appartement-->the screen gets dark-->Text appears "meanwhile..." --> action in a very different room takes place-->the "view" returns
#18
hi folks,
I've got a little question again. My character I is in (let's say) room1.While he's there I want an animation in a different room (f.e. room2) to be activated and be shown to the player (human). after that the "view" shall return to the player.

I tried to realize this by letting the character walk to the room and set the him invisible in that room. On character enters screen (after fadein) I let the animation start. This worked so far.

Code: ags

player.Walk(61,131, eBlock, eWalkableAreas);
player.Say("message1");
player.ChangeRoom(15); //<--at this point of actions the "view" should change
player.LockView(16);
player.Animate(0,12,eOnce,eBlock);  
ReleaseCharacterView (EGO); //old code
object[3].SetView(15);
object[3].Animate(0,1,eRepeat,eNoBlock);
player.Say("message2");


but when I do this the player.ChangeRoom-command got skipped and will be executed after the whole code.
This actually makes sense, but it's not what I want.
Is there a different way?? I hope you now what I mean. can anybody help?
???
#19
hmm...thanx a lot. I am using v.261. I guess I have to check out the new version and get familair with this way of scripting. thanx anyway
#20
hmm, blocking...this might even be better. How is this working? I found out, that my solution can lead to difficulties if yo want for example let your character move to a certain location. can you paste an example? it would be very helpful. thx for your help and hints
SMF spam blocked by CleanTalk