The Dink Network

create_sprite ? asking what the 3 number is

April 4th, 01:27 AM
duckdie.gif
crypto
Peasant
 
create_sprite(314, 219, 9, 531, 1);

so my guess is screen x, screen y, ???. seq number, seq

my question is:

first is my assumption correct ?

and second

what is ???
April 4th, 04:21 AM
slimeg.gif
metatarasal
Bard Male Netherlands
I object 
1) Yeah, pretty much.

create_sprite(x,y,brain,seq number,frame)

2) It's the brain, it determines behavior of the sprite. It's like setting the sp_brain() of the sprite.

0: default, no special behavior
1: humancontrolled
2: no practical use
3: duck (plays duck sound)
4: pig (plays pig sound)
5: Dying animation (go through animation, leave last frame drawn)
6: Repeat (go through animation repeatedly)
7: Sequence (go through animation once)
8: Text (???)
9: diagonal enemy
10: horizontal/vertical enemy
11: Missile (used for missiles)
12: Scale (shrinks/grows sprite, then kills it)
13: Mouse (mouse-controlled)
14: Button (has button-on/button-off 'events')
15: Shadow (A shadow for another sprite)
16: NPC
17: Missile (used for missiles, goes through animation only once (I think))

Most of the time you use 0. Otherwise it's usually 9 or 16, others are more rare. Note that often some other properties (such as speed, basewalk, brain_parm etc) need to be set to get the proper behavior from the sprite.

I think you can also put in some arbitrary number and it will behave as 0.
April 4th, 05:32 AM
custom_marpro.png
Marpro
Peasant Male bloop
-- Marp Ro 
Have a look at this
April 4th, 07:16 AM
slimeg.gif
metatarasal
Bard Male Netherlands
I object 
The DinkC reference that comes with the main game is superior to that one though (it's based on the one you linked).

You can find it in the 'development' folder of the game.
April 4th, 03:17 PM
duckdie.gif
crypto
Peasant
 
ya the reference may help if it has the commands in there and what there for, situations to use them..

seems straight forward enough, but dink c dose odd things ...

like equating true when it's clearly it is not true.

it has issues with white space, and order ... the white space i keep messing up because ..... this is easier ..

#include <iostream>

using namespace std;

int main( int argc, char* argv[] )
{
cout << "the number of args passed was" << ": " << argc << endl;

for ( int mycount = 0; argc != mycount; mycount++ )
{

cout << mycount << ": " << argv[ mycount ] << endl;
}

cout << "the program has finished" << endl;

}

didn't paste quite right ... but as you can see i use a lot of white space for readability
----------------

Thanks for the info on the brains, i was wondering about them
April 4th, 03:40 PM
dinkdead.gif
Are you using that in a Dink script? Or is that an example?

Cos that ain't DinkC! Not surprised it isn't working

"like equating true when it's clearly it is not true"
Can you give an example of this?
April 4th, 03:44 PM
duckdie.gif
crypto
Peasant
 
no that was just me leaning cpp ... doing that at the same time ...

moving on from bash.. both have a close structure, so one helps the other...

and making the mod gives me a reason to stay focused ... or at least entertained while doing it ..

and ya i can

so ... bunch of stuff that work no issue

&story = 1
then is a other script
if (&story == 2)
{
some stuff
}
.... this was triggering at 1 ... so i put it at the bottom and it worked..

maybe I missed a bracket, but i'm writing this in geany so missing brackets are red.. vars being things there not seems to be an issue ... unless you put all the highest numbers on the bottom .... it was some of the reason i was asking about CRLF vs LF [carriage return line feed vs line feed]