Attaching scripts to sprite numbers
Possible? I know you can change sprite attributes, but my attempts to attach a script have so far failed miserably.
Here is how to do it.
Lets say you wana attach a script called temp.c to a sprite.
DinkEdit:
Pick up the sprite a hit shift-5 and type 'temp' (not temp.c) in the box, hit enter, DONE
WinDinkEdit:
Go into the sprite properties and just type 'temp' in the box next to the word script.
Lets say you wana attach a script called temp.c to a sprite.
DinkEdit:
Pick up the sprite a hit shift-5 and type 'temp' (not temp.c) in the box, hit enter, DONE
WinDinkEdit:
Go into the sprite properties and just type 'temp' in the box next to the word script.
Well, if I didn't know how to do that, how would I have done any of CC?
No, what I want to be able to do is attach a script to a map sprite from within another script. Possible?
No, what I want to be able to do is attach a script to a map sprite from within another script. Possible?
: Well, if I didn't know how to do that, how would I have done any of CC?
: No, what I want to be able to do is attach a script to a map sprite from within another script. Possible?
Sure. Here's how:
int &temp = sp(YourSpriteNumberHere);
sp_script(&temp, "YourScripthere");
: No, what I want to be able to do is attach a script to a map sprite from within another script. Possible?
Sure. Here's how:
int &temp = sp(YourSpriteNumberHere);
sp_script(&temp, "YourScripthere");
: : Well, if I didn't know how to do that, how would I have done any of CC?
: : No, what I want to be able to do is attach a script to a map sprite from within another script. Possible?
: Sure. Here's how:
: int &temp = sp(YourSpriteNumberHere);
: sp_script(&temp, "YourScripthere");
Hmm, that's what I was trying. Ho hum, I'll just have to try it again, check for errors etc.
: : No, what I want to be able to do is attach a script to a map sprite from within another script. Possible?
: Sure. Here's how:
: int &temp = sp(YourSpriteNumberHere);
: sp_script(&temp, "YourScripthere");
Hmm, that's what I was trying. Ho hum, I'll just have to try it again, check for errors etc.
anyone ever tried making an animated map screen?? now THAT would be cool...
Let me know if you get it to work (I dont' think I did sp(&current_sprite) though. My work around was to use another sprite to find the first sprite by brain (I think) and use a global to control it...
: : Well, if I didn't know how to do that, how would I have done any of CC?
: : No, what I want to be able to do is attach a script to a map sprite from within another script. Possible?
: Sure. Here's how:
: int &temp = sp(YourSpriteNumberHere);
: sp_script(&temp, "YourScripthere");
Heh, it worked! I have no idea what I was doing wrong before, but the copy and paste of this worked perfectly. Many thanks
: : No, what I want to be able to do is attach a script to a map sprite from within another script. Possible?
: Sure. Here's how:
: int &temp = sp(YourSpriteNumberHere);
: sp_script(&temp, "YourScripthere");
Heh, it worked! I have no idea what I was doing wrong before, but the copy and paste of this worked perfectly. Many thanks










