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

#41
Hi.  In AGS I can draw lines between points, but I'd also like to be able to flood fill the areas between those lines, if possible.  It's odd that I can't find this, since the room editor has this feature...  ::)

Mostly because I can't /skew/ a rectangle in-game... unless I can?
#42
Quote from: tzachs on Tue 05/10/2010 14:45:49
And also you should have written if (var1 == 0) and not if (var1 = 0).

I actually did use two ==, but thanks.  Anyway, Khris your code worked perfectly!  That's a brain teaser equation!  And a lot simpler than and if/then statement. 8)

Thanks!  ;D
#43
Mostly solved.  I just need to make an on / off button.  :-\

0 to 1 and back to 0 each time the button is pressed.  I tried [if (var1 = 0) var1 = 1;] and vice versa but nothing happened.
#44
Between Fonts and Scripts there's a section for Global Variables.  You just right click the blank list and hit "add", give it a name (score1, score2..), choose "int" for intergers and what the value should be at the beginning. 8)

You can try this in a room.  Make a hotspot, then go over to the bottom right and click the lightning bolt over the room properties.  Choose one of the actions for a click on the hotspot, which will take you to the room script under a function.

Example:

function hHotspot1_Look()
{
 score1 = (score1 + 4);
 Display("score1: %d", score1);
}

When you Look at hotspot one, you'll add 4 points to score1 and your new score will be displayed. ;D

??? P.S. I have my own question I'd like to ask.  ???

When editing GUIs you can add a GUI label and replace the name with @SCORE@ to display the score, but what about OTHER VARIABLES?  How can I display a variable OTHER THAN the game's default score in a gui label?
#45
Makes me think of the Ring, although I'm sure there are any number of similar rooms in movies.



As for perspective, draw a vanishing point in the center, and connect the four corners of the picture to that point.



Now, divide the top and bottom line of the picture into equal sections, along with the left and right, and connect the ends to the center.  The line directly in the middle of the picture through the vanishing point is the horizon, and you can see the tops of objects below, or the bottom of objects above it.



To draw a box in the middle of the room, draw a rectangle in the middle of the room, and connect the ends of the rectangle to the vanishing point.  Now cut off the lines to the vanishing point with another straight square within the bounds you set.  A square box is easier to achieve in a square picture. 8)

#46
I'd start by looking up pictures of hospitals, and working from there.  Typically white with overhead lights.  Don't forget small things like clocks on the walls, sprinklers, fire extinguishers, maybe a glass axe container (in case of zombie emergency... 8) ), and of course hospital equipment, which you can look up individually to get a better view of.

#47
Success! ;D

This whole time, all I had to do was go to the room events list and click the "..." to make the game recognize the script. ;)


Thanks everyone! 8)
#48
Thanks!  Lol, I had given up trying to get the character to move and have just been working on the walking cycle.

When I said I couldn't figure out how to initialize the character, what I was having trouble with was that although the starting point was in the character page, and the character was initialized with the game, I couldn't figure out how to call the character for use into the code I was trying, since I couldn't re-initialize him (ags pointed out that was redundant) and when I called him to walk in my function nothing happened.  But looking at your code I see how AGS handles it.

I've just started using AGS, and I feel like it's going to be far more user-friendly than the other programs. ;)


[Edit]:  Sigh.  I still can't get the character to move.  All it does is start at the coordinates in its character page and stay there, no matter which coordinates I start it at.  I like the idea about him starting at a random location everytime I enter the room, but even changing that didn't make him move... :-\

Thanks again for your help! 8)
#49
Well, no, cause when I make a function for cChar1.walk(x,y,eNoBlock, eAnywhere) nothing happens.  They load in the room at the coordinates I put in their character properties.

i.e.
function hHotspot1_AnyClick()
{
cCarl.Walk(80, 200, eNoBlock, eAnywhere);
}

I'd prefer them to just start moving once the room loads, but putting in First time enters room, or any of the room functions, confuses it.  That's why I was confused that there was no way to re-initialize the character before having it do something.
#50
Thanks! ;D

I haven't actually had time to fool around with it yet, but that is exactly what I was looking for.  Once I have it working I'll post the entire loop. 8)

Edit:
Okay, well tried getting the character to move.  I actually haven't worked with getting a character to move around in a room I've made from scratch.  I can get the Roger character from the Demo to move around, but since characters are initialized separately under character settings, they always say the character was already initialized, but it still says "unexpected cChar1".

How do you REinitialize a character at the beginning of an empty room script? ???
#51
What I want is for an npc character to walk around a square, but not just walking the same loop over and over.  My idea is that each time it hits a corner, it'll randomly decide where to go from there.

My corners are at A. 80,80 (NW) B. 200,80 (NE) C. 80,200 (SW) and D. 200,200 (SE).  So lets say it starts at point A.  Let's say each is true of the points.

A. 100% chance of walking to B.
B. 25% chance of walking back to A, 75% chance of walking to D.
D. 75% chance of walking to C, 25% chance of walking to B.
And C. 25% chance of walking straight to A, and a 75% chance of waiting 5 seconds first. ::)


I know I could make it completely random, but I've played Tale of Two Kingdoms and I don't want my npcs going all over.  Besides, I'd like to do other things with percent/fractional odds, and I don't know how to do a rand statement when the odds are 1:4.

Think you can help me? 8)
SMF spam blocked by CleanTalk