Community

AGI Programming => Mega Tokyo AGI Archive => Topic started by: Dwarfy on November 07, 2002, 02:26:06 PM

Title: Linux AGI_Studio
Post by: Dwarfy on November 07, 2002, 02:26:06 PM
Can someone help me?

I know how to do views, a little do prios. and a little to script logics. The problem is, so many thing what i do, do someting wrong. Like:

Logics

if (said("wear","maks")) {
  if(has("mask")) {
    print("Ok.");
    load.ego(o2);
    set.ego(o2);
    }
    else {
      print("You don't have a mask.");
    }
}
...

or Prioritys

If i put a pink colour anywhere (@the priority-screen), i can walk behind, then no one can see the char. But if i go under the pink colour, nobody can see me! I must have to go 1cm down, then i can see the Char.


Help me!

-Ever alias SidyPlay
Title: Re:Linux AGI_Studio
Post by: Zonkie on November 07, 2002, 03:25:15 PM
Hi,

you can't use a command like "set.ego", because that doesn't exist. Instead, you have to assign a different view to the ego, which you do by
Code: [Select]
set.view(object, view)
Try the code like

Code: [Select]
if (said("wear","mask")) {
  if(has("mask")) {
    print("Ok.");
    load.view(view number);
    erase(ego);
    set.view(ego,view number);
    draw(ego);
    }
    else {
      print("You don't have a mask.");
    }
}

I'm not sure if you have to erase the ego and draw it again, but this works for me.

Good luck!

Zonkie
Title: Re:Linux AGI_Studio
Post by: Joel on November 07, 2002, 03:32:10 PM
You do not have to erase ego and draw it again...but if I'm not mistaken ego will be updated on the next interpreter cycle and not immediately if you don't. It may not be updated until the next interpreter cycle anyway, but I wouldn't put money on it.
Title: Re:Linux AGI_Studio
Post by: Joel on November 07, 2002, 03:35:10 PM
I think you may also be able to do a force.update() without needing to bother with erasing and redrawing ego.
Title: Re:Linux AGI_Studio
Post by: Andrew_Baker on November 08, 2002, 03:52:52 AM
Also, if your trouble is simply the pink priority covering your object inappropriately, try setting it to one priority lower.  I often set my priority one too high based on the number given me in Picedit...