Scripting question
This must be a very easy one to answer, and I feel like a newbie asking, but since I have no clue how to do it...
How do you put a static graphic (a wall and such) on screen by using a procedure?
I've tried the int &name = create_sprite(); but that doesn't work.
And how do you move such a sprite without seeing the other sprites that are in the same sequence?
Like moving a wall - I've seen it in some D-mod, but can't remember which one.
Thanks.
How do you put a static graphic (a wall and such) on screen by using a procedure?
I've tried the int &name = create_sprite(); but that doesn't work.
And how do you move such a sprite without seeing the other sprites that are in the same sequence?
Like moving a wall - I've seen it in some D-mod, but can't remember which one.
Thanks.

: This must be a very easy one to answer, and I feel like a newbie asking, but since I have no clue how to do it...
: How do you put a static graphic (a wall and such) on screen by using a procedure?
: I've tried the int &name = create_sprite(); but that doesn't work.
: And how do you move such a sprite without seeing the other sprites that are in the same sequence?
What brain are you giving the sprite?
Have you set sp_speed()?
Set brain to 0, give a speed of say 3 and see what happens. I usually have sprites that are static placed in the map already and then attach a script that moves them on certain triggers (ie being pushed, hit...) So I'm not sure 100% on the brain setting (I don't actually set it via the script).
: Like moving a wall - I've seen it in some D-mod, but can't remember which one.
: Thanks.
: How do you put a static graphic (a wall and such) on screen by using a procedure?
: I've tried the int &name = create_sprite(); but that doesn't work.
: And how do you move such a sprite without seeing the other sprites that are in the same sequence?
What brain are you giving the sprite?
Have you set sp_speed()?
Set brain to 0, give a speed of say 3 and see what happens. I usually have sprites that are static placed in the map already and then attach a script that moves them on certain triggers (ie being pushed, hit...) So I'm not sure 100% on the brain setting (I don't actually set it via the script).
: Like moving a wall - I've seen it in some D-mod, but can't remember which one.
: Thanks.

: : This must be a very easy one to answer, and I feel like a newbie asking, but since I have no clue how to do it...
: : How do you put a static graphic (a wall and such) on screen by using a procedure?
: : I've tried the int &name = create_sprite(); but that doesn't work.
: : And how do you move such a sprite without seeing the other sprites that are in the same sequence?
: What brain are you giving the sprite?
: Have you set sp_speed()?
: Set brain to 0, give a speed of say 3 and see what happens. I usually have sprites that are static placed in the map already and then attach a script that moves them on certain triggers (ie being pushed, hit...) So I'm not sure 100% on the brain setting (I don't actually set it via the script).
I set speed to 1, but I'll try 3. I've given it brain 0. I would like to attach a script, but it's in the intro, so no one can trigger it, at least not the player.
: : How do you put a static graphic (a wall and such) on screen by using a procedure?
: : I've tried the int &name = create_sprite(); but that doesn't work.
: : And how do you move such a sprite without seeing the other sprites that are in the same sequence?
: What brain are you giving the sprite?
: Have you set sp_speed()?
: Set brain to 0, give a speed of say 3 and see what happens. I usually have sprites that are static placed in the map already and then attach a script that moves them on certain triggers (ie being pushed, hit...) So I'm not sure 100% on the brain setting (I don't actually set it via the script).
I set speed to 1, but I'll try 3. I've given it brain 0. I would like to attach a script, but it's in the intro, so no one can trigger it, at least not the player.
: maybe preloading the sequence helps ???
It's not supposed to be a sequence, if that's what you mean. It's just a wall, that is supposed to move when I want it to, but I can't even get the wall to appear on screen when using int &name = create_sprite();, let alone move it.
It's not supposed to be a sequence, if that's what you mean. It's just a wall, that is supposed to move when I want it to, but I can't even get the wall to appear on screen when using int &name = create_sprite();, let alone move it.
: : maybe preloading the sequence helps ???
: It's not supposed to be a sequence, if that's what you mean. It's just a wall, that is supposed to move when I want it to, but I can't even get the wall to appear on screen when using int &name = create_sprite();, let alone move it.
Um... you are doing like:
//beginning of script
int &name = &create_sprite(200,100,0,31,25);
sp_speed(&name,1);
//junk goes here
move_stop(&name,2,300,1);
right?
: It's not supposed to be a sequence, if that's what you mean. It's just a wall, that is supposed to move when I want it to, but I can't even get the wall to appear on screen when using int &name = create_sprite();, let alone move it.
Um... you are doing like:
//beginning of script
int &name = &create_sprite(200,100,0,31,25);
sp_speed(&name,1);
//junk goes here
move_stop(&name,2,300,1);
right?
: : : maybe preloading the sequence helps ???
: : It's not supposed to be a sequence, if that's what you mean. It's just a wall, that is supposed to move when I want it to, but I can't even get the wall to appear on screen when using int &name = create_sprite();, let alone move it.
: Um... you are doing like:
: //beginning of script
: int &name = &create_sprite(200,100,0,31,25);
: sp_speed(&name,1);
: //junk goes here
: move_stop(&name,2,300,1);
: right?
I've figured it out. I thought of that, and then I saw your example, Redink1. I used sp_base_walk(); and freeze(); too. Stupid!
Without those it works fine. Thanks, guys!
: : It's not supposed to be a sequence, if that's what you mean. It's just a wall, that is supposed to move when I want it to, but I can't even get the wall to appear on screen when using int &name = create_sprite();, let alone move it.
: Um... you are doing like:
: //beginning of script
: int &name = &create_sprite(200,100,0,31,25);
: sp_speed(&name,1);
: //junk goes here
: move_stop(&name,2,300,1);
: right?
I've figured it out. I thought of that, and then I saw your example, Redink1. I used sp_base_walk(); and freeze(); too. Stupid!


It's not supposed to be a sequence, if that's what you mean.
Nope but if you use lots of created frames you will have to preload the seq even if it's not a sequence...
but I works so don't pay attention to this post...
Nope but if you use lots of created frames you will have to preload the seq even if it's not a sequence...
but I works so don't pay attention to this post...

: It's not supposed to be a sequence, if that's what you mean.
: Nope but if you use lots of created frames you will have to preload the seq even if it's not a sequence...
: but I works so don't pay attention to this post...
No, you should always preload the seq. even if it works fine, it might not work on someone else's computer.
: Nope but if you use lots of created frames you will have to preload the seq even if it's not a sequence...
: but I works so don't pay attention to this post...

No, you should always preload the seq. even if it works fine, it might not work on someone else's computer.