ID:178816
![]() Apr 1 2002, 9:09 am
|
|
How would I make an object or an image be invisible to others but visible to one character than make it so that after a while that player can not see it anymore either.
|
Nifty :)
I haven't really used image yet (because I haven't had the need) but I can definetely see using them at some point. Mind if I steal that? I don't really feel like writing my own :p |
English wrote:
Nifty :) Note that I'm not actually sure if it works or not, since it's untested. It's going in my list of snippets anyway -- if I can ever get my freakin' website loading subpages rather than just loading the main page for all of 'em (for some odd reason, when I break out of the main proc suddenly the Section datum is nulled out, which prevents subpages from reading it, which makes them all think they're the main page). So you can steal it, yes. =) |
Maybe I should test it before I use it then ;)
Even if it doesn't work it looks good in principle and should work fine with a few minor tweaks (if it needs them at all). Anyway, thanks :) |
English wrote:
Maybe I should test it before I use it then ;) Should work now... I cleaned out the errors and reposted. =) |
(for some odd reason, when I break out of the main proc suddenly the Section datum is nulled out, which prevents subpages from reading it, which makes them all think they're the main page) I'm not exactly sure what the webpage code you're talking about does, but this sounds suspiciously like a problem I had when creating objects that did browse thingies. What I did was create an object, then use a proc of that object to browse some stuff. The problem was that after that, no references to the object still existed and the garbage collector ate them. I ended up creating a little proc that always runs for them, which I needed to do for my purposes anyway, which ensured that the garbage collector left them alone. -AbyssDragon |
AbyssDragon wrote:
(for some odd reason, when I break out of the main proc suddenly the Section datum is nulled out, which prevents subpages from reading it, which makes them all think they're the main page) But the thing is, it would never break out of a situation where there wouldn't be a reference pointing to them. Once it tries to run a procedure, suddenly the arguments don't exist any more. This is verified by my debug output: Sun Mar 17 19:39:50 2002 BuildPage() - No subsection! BuildPage() - No page! GenerateToC() - No subsection! GeneratePage() - No subsection! GeneratePage() - No page! LoadText() - No section! LoadText() - No subsection! LoadText() - No page! In other words, though it all is called from the single wrapper procedure BuildPage(), suddenly LoadText() doesn't have a section argument given to it. I put my webpage by the wayside for now, anyway. I might get back to it next week. |
Welcome to the world of client.images!
Thus, let's say you cast "Know Alignment" on a person. This reveals their alignment as LAWFUL_GOOD.
Now, you check it in:
var/icon_state
switch(alignment)
if(LAWFUL_GOOD) icon_state = "lawful good"
Now, you do the following:
person.DisplayImage('alignment_auras.dmi', icon_state, usr, 50)
This will display the lawful good aura around this person to the usr for 5 seconds. That goody-two-shoes.
There you go! =)