debikkel |
Hi guys, I am trying to export an AGI room walking-area by modifying AGI Studio. It comes a long way but if someone can clear up some of my questions that would be great: What color means what? Right now I know colors 0 - 3 (or 0 - 4?) are used for drawing the walking lines, but they all mean different things? It seems these are not closed polygons but I am not sure. The project I need this for only allows for closed polygons to be drawn. Does AGI give any information when one polygon / shape is done drawing and when a new one starts? Right now things go wrong just a bit, since I am only drawing color 0 (the black lines) into one polygon. Any information on the subject is more than welcome. Thanks in advance, Martin |
AGI1122 |
0/black = unconditional line, the actor cannot cross that line no matter what. 1/blue = conditional line, the actor can sometimes cross this line and at other times he cannot, which is why it's called conditional. For instance you would use a condition line for a door animation. When the door is closed you would set the condition to be that he cannot cross blue lines. But when the door is open you would set it so he can cross it so he can walk through the door way. 2/green = trigger, when they step on the green lines it triggers something to happen in the script. 3/cyan = water, basically it's used with the object.on.water(); object.on.land(); and object.on.anything(); to see what they can step on. For instance some animations are allowed to be on water while others are not. |
Sidrious play |
I don't get how cyan works! Long times ago, I wanted to try it in a test game, but there always was an error... Can someone tell me the code? Like, when I put a green light, the code is: if (isset(f3)) { ... right? |
AGI1122 |
Well cyan is just water, it doesn't require any specific code unless you want to define who and what can walk or can't walk on the water. For instance, if you use object.on.water(); on the ego, that makes it so the ego can only walk on water, it won't let him get out out of the water area. If you use object.on.land(); he can't get in the water area, but can walk around anywhere else. And object.on.anything(); let's him walk on water or land. |
Sidrious play |
Now, I got THAT... but, what is the flag of cyan? if (isset(f ? ); animate.obj(swimming); load.view(..); ... } Or is there anything else to do, to see an swimming-animation? |
AGI1122 |
f0 is for ego on water. f3 is for ego on signal line. if (isset(f3)) { print "You touched a signal line"; } if (isset(f0)) { print "You are touching water"; } |
Sidrious play |
Thanks! I'm gonna try it. EDIT: I don't know what the f3 for is, but it works whitout it! Thanks! |
morrowind |
Hi what i want to do is have an animation happen to different ways if your in different positions. For example you have to throw something at an object but if your standing too close it bounces back & hits you. So i've draw a GREEN priority line around the object, so does this mean that if the character is standing within that line it will set a trigger automatically ? is that what the green priority line does ? & what would be the flag for that ? because i see is : flag 0 = ego_on_water flag 1 = ego_hidden flag 2 = input_received flag 3 = ego_touching_signal_line but none of those are the green trigger priority line are they? f235 would have to be set for this action to happen in my game so how wud i go about writing the logic? would it be something like :- if(isset(f235)) { if(isset(f???)) { // ego walked over green priority line print("oww my eye"); } } Thanks |
AGI1122 |
green = f3 if (isset(f3)) { print "They touched the green line..."; } |
MagickPoultry |
morrowind- Here's how I would do it, if I understand what you want. I would use the water priority (3) to represent the area too close to the object. (It doesn't have to actually be water.)Then, if the ego is standing in the "water" area when it throws the thing, it would bounce back and hit him. The green signal line only works if the ego is touching it at the time, so outlining the area with it wouldn't work if the ego was inside the area but not touching the border. So, if you have water represent the area, your code, I guess, would look something like this: if(isset(f235)) { if(isset(ego_on_water)) { // ego standing in the water area print("oww my eye"); } } Without knowing exactly what all is going on in the game at the time, I can't tell if that's exactly right. For instance, if you don't reset f235, it's going to keep repeating "oww my eye" since the ego will still be standing in the water. |
morrowind |
Hey thanks man its helpful when people actually explain stuff like that, i did wonder if water just meant that you had to be in the outlined area as i tried the green line & i did find you had to be standing exacting on it whilst saying the command. yeah theres more to my game than it just printing a line back to you when your in that space & you throw the thing & the object so i think i can figure all the animation & resetting of flags, I've done it before so shouldn't be too hard, i don't mind the actual flags its just doing animations, all the resetting of flags gives me a headache, well especially if your logic is complicated. Anyway thanks again Mysterious Chicken |