Re: Buttons
I was wondering what decided what hapens when you press buttons like ctrl and the arrow keys. Is it done by scripts called button 1-2-3 etc.? If so what do those scripts contain and where could I find them. If It's something else please let me know.
If you click on a button in the main screen (or use ctrl), it'll start a special script. I think they were start-1 for the start button, start-2 for the load button and start-3 for the exit button.
I think these scripts are spawned once you press one of the button sprites, but I could be wrong there. In any case, they launch these scripts somehow.
I think these scripts are spawned once you press one of the button sprites, but I could be wrong there. In any case, they launch these scripts somehow.
They're probably wired into the engine and not editable by scripts, although there is one for the escape key (escape.c).
Oh, I see I misinterpreted, sorry. I'm not sure if this would work, but you could disable standard movement somehow and make the player move whenever you press a key.
I don't think the Dink engine is capable to do this?
I don't think the Dink engine is capable to do this?
Oh, I see I misinterpreted, sorry. I'm not sure if this would work, but you could disable standard movement somehow and make the player move whenever you press a key.
I don't think the Dink engine is capable to do this?
Yes, it's possible, to an extent. It has been done before, in fact.
There is a way to edit what the "wired" keys (ctrl, enter, spacebar, shift, and so on) do using wait_for_button scripts, but if you're planning on doing some thorough editing, you might be better off editing the Dink engine since wait_for_button scripts can't do everything.
I don't think the Dink engine is capable to do this?
Yes, it's possible, to an extent. It has been done before, in fact.
There is a way to edit what the "wired" keys (ctrl, enter, spacebar, shift, and so on) do using wait_for_button scripts, but if you're planning on doing some thorough editing, you might be better off editing the Dink engine since wait_for_button scripts can't do everything.
Mostly I'm trying to control a different sprite than Dink while still being able to control Dink. I would really like to know if there's a way to script this.
Ouch. That depends. What do you mean by "control"? You might be able to get it to do various things, but if you want to, say, have two player characters at the same time, I don't think you'll be able to do it without editing the engine.
I'm not really sure if this is what you are looking for, but.....
Create the sprite you want to control while still controlling Dink. Set it's base_walk, give it a brain of 1, and then when you go onto the screen that sprite is on, the sprite should move with you. Oh, and set the speed.
Create the sprite you want to control while still controlling Dink. Set it's base_walk, give it a brain of 1, and then when you go onto the screen that sprite is on, the sprite should move with you. Oh, and set the speed.
That's a good idea. You could make a two player game. Is there any script that controls Dink completely? If there is, then you could just copy & paste everything in here to another script, edit which buttons do which, (e.g. change up, down, left, right, to A, D, W, S) and you'd have a two player game.
Though it might be kinda hard to work out the screen scroll system, unless you've only got one screen.
Though it might be kinda hard to work out the screen scroll system, unless you've only got one screen.
No, no, no. Making a real time (not turn-based) two player game where you would fully control Dink and another sprite at the same time sounds pretty impossible to me with the current version of Dink.
If you give a sprite a brain of 1, all it will do is emulate Dink somewhat.
If you give a sprite a brain of 1, all it will do is emulate Dink somewhat.
But, is there a certain script which controls the Dink brain?
No. Not unless your definition of "a script" is the Dink engine source code.