New Problem

Corby Hi, I have my ego walk over a control line, which triggers f3 and causes the ego's view to change to that of running. How can I return the ego back to normal if it walks over the same control line for a second time?
Robin_Gravel Let me see...

if (isset(f3)){
if (!isset(f100)){
set(f100);
.....
}
else{
reset(f100);
}
}



Robin Gravel
Corby Still can't get this working... what's with the ! in (!isset) Robin?? I think I just may need this explained to be verbally rather than in code. Thanks :)
Andrew_Baker Imagine that you have a flag (which you do). It is either running or walking. If your character touches the priority line, then it should swap between them, right? However, you should probably jimmy some code to make sure that it doesn't constantly flip between the two states... in pseudo code, it might be something like,

if (touching_line) {
if (!locked) { // ! means NOT
toggle.flag(running);
set(locked);
}
}
else {
reset(locked);
}

Something like that. It uses two flags (one to change the state and the other to keep your ego from switching back and forth). Unfortunately, it's been so long since I've used AGIStudio that I've forgotten the proper function calls.
Sami_Tervo Hehehehe >:)

* Grabs flags and burns them! *

Here's a almost flag-free way: This method is based on direction of ego (v6). Checkout help-file for further information of directions (e.g. getdir)

if(f3){ // Ego hittin Signal Line
if(v6 == 7){ // Ego coming from left
set.view.v(v16,runninview);
force.update(o0);// Optional, if you don't want to wait for next loop
}
if(v6 == 3){ // Ego coming from right
set.view.v(v16,walkinview);
force.update(o0);
}
}

7 & 3 ain't sure..don't remember those right now..like I said, check out that help-file. You probably have to add more directions like coming from up-right, down-left and so on...hopefully you get the picture.

And this is good only for straight signallines..
Corby Great, everything's working fine, thanks!