📧 Message Board Archive

random script questions
This seems like a good, active board for questions, and we all know some poor sap will have some about dinkedit!



1- Is there an independent part of a script that controls a sprite walking randomly, like a person? I tried copying and pasting different parts of code that looked like a walk script, but none have worked.



2- is there a way to have dink or whoever start with a very powerful sword, then lose it soon after? name -I was thinking "God Sword of Doom" but I'm open to any suggestions!



3- would it be possible to have dink pay for something in a choice selection, then have it appear on say, a counter or table near him? I was hoping I could do this with food, or will I have to settle for it being in the inventory? How is the pay script set up?



Thanks to all who help dinkers dink!
Re: random script questions
: This seems like a good, active board for questions, and we all know some poor sap will have some about dinkedit!

: 1- Is there an independent part of a script that controls a sprite walking randomly, like a person? I tried copying and pasting different parts of code that looked like a walk script, but none have worked.



Walking isn't (normally) controled by a script. You just give the sprite the brain 16 the "smart person brain", a speed and a base walking sequence. For example:



sp_base_walk(&current_sprite, 250);

sp_brain(&current_sprite, 16);

sp_speed(&current_sprite, 2);



: 2- is there a way to have dink or whoever start with a very powerful sword, then lose it soon after? name -I was thinking "God Sword of Doom" but I'm open to any suggestions!



Sure, just change start-1.c and add it after it adds Dink's fist (which counts as an item). When when whatever dink is supposed to lose it, just go kill_this_item("doomsord"); or whatever you called it.



: 3- would it be possible to have dink pay for something in a choice selection, then have it appear on say, a counter or table near him? I was hoping I could do this with food, or will I have to settle for it being in the inventory? How is the pay script set up?



I'm not sure I understand why, but just use the create_sprite command. This could get a little complicated but you can do it if you want.



: Thanks to all who help dinkers dink!

Re: random script questions
: This seems like a good, active board for questions, and we all know some poor sap will have some about dinkedit!

: 1- Is there an independent part of a script that controls a sprite walking randomly, like a person? I tried copying and pasting different parts of code that looked like a walk script, but none have worked.

: 2- is there a way to have dink or whoever start with a very powerful sword, then lose it soon after? name -I was thinking "God Sword of Doom" but I'm open to any suggestions!

: 3- would it be possible to have dink pay for something in a choice selection, then have it appear on say, a counter or table near him? I was hoping I could do this with food, or will I have to settle for it being in the inventory? How is the pay script set up?

: Thanks to all who help dinkers dink!





well, im too tired to think out how, but I'm fairly sure that all that is possible..
Re: random script questions


A good example that helped me learn stuff like that is the .c scripts that dink.106 has included in "source". Try looking at "s1-mh-f" , the scroll the get a fireball.