Author
|
Topic: Script problems
|
abbey |
posted 04-29- 07:03 PM CT (US)
Can someone tell me whats wrong with this script, it's of a hole I want Dink to climb through. When I go up to the hole Dink climbs in and then it freezes, I then need to reset my computer.void main( void ) { preload_seq(452); sp_touch_damage(¤t_sprite, -1); } void touch( void ) { sp_x(1, 320); sp_y(1, 315); sp_seq(1, 452); sp_frame(1, 1); sp_nocontrol(1, 1); //dink can't move until anim is done! sp_touch_damage(¤t_sprite, 0); sp_brain(1, 0); wait(2000); &player_map = 41; sp_x(1, 315); sp_y(1, 375); load_screen(41); draw_screen(); }
|
Beuc
|
posted 04-30- 05:38 AM CT (US)
You set a brain of 0 for Dink, while it must be 1 if you want the player to control Dink. Remove this line or add a sp_brain(1, 1) after the screen change. Anyway, if you don't want Dink to move, I'd suggest you use freeze(1), and then unfreeze(1); to free Dink :)Oh, also, I see that you change screen, and when this appear, then the current script is deleted from memory... You need to write a script_attach(1000) (I think) before the screen change. If anyone knows the correct procedure, then please reply, I've quite forgotten ;) Btw, I think you could have quitted Dink without restarting your computer, using the keys Alt+Q It quits Dink even if Dink is frozen or talking with people :)
-- Beuc
|
abbey
|
posted 04-30- 07:34 AM CT (US)
I copied The hole3 script from the dink source. then I put in the screen numbers, that I wanted to warp too.It still didn't work.so I thought It could be to do with the room I wanted to warp too.I dont think you can have any other warps in the room that I want the hole to warp too, because When I took the stairs away that I hade in there It worked, well sort off anyway. Dink moves really slowly and it takes forever to walk to the other side of the room. I dont know I'M Stumped!!!!. |
FF4LIFE
|
posted 04-30- 08:36 PM CT (US)
Well....me too. I just copied that script...i'll put what i used here... void main( void ) { preload_seq(452); sp_touch_damage(¤t_sprite, -1);} void touch( void ) { freeze(1); sp_x(1, 472); sp_y(1, 330); sp_seq(1, 452); sp_frame(1, 1); sp_nocontrol(1, 1); //dink can't move until anim is done! sp_touch_damage(¤t_sprite, 0); sp_brain(1, 0); wait(2000); script_attach(1000); fade_down(); &player_map = 182; sp_x(1, 401); sp_y(1, 283); load_screen(182); sp_brain(1, 1); draw_screen(); fade_up(); kill_this_task(); }
this is basicaly a copy of that script....but it works for me :)
|
abbey
|
posted 05-01- 05:49 PM CT (US)
I have sorted it out now, It was to do with an object I had on the screen I was trying to warp too.It had a script problem or something, Anyway Thanks for the help everybody. |
abbey
|
posted 05-01- 05:59 PM CT (US)
Oh and by the way, Beuc said that alt+Q quits the program when dink is frozen, it doesn,t work for me, I also try alt+F4 and Ctrl+Alt+delete, and none of them work. Also sometimes when I load up Dink or any of the Dmod's I get a black screen just before the title bmp. and the game doesn't load.I try all of the above, and none of it works, I have to then reset my p.c. I have to keep trying, it sometimes takes 2 or 3 resets. Anyway I was just wondering if any one else has this problem. Or is it just me. |
abbey
|
posted 05-01- 06:01 PM CT (US)
Oh, and it doesn't do it on any of my other programs And games I have. |
FF4LIFE
|
posted 05-01- 06:16 PM CT (US)
Messed up.......alt-f4 should really work..oh well....just don't make places where you can get frozen:) |
Beuc
|
posted 05-02- 05:45 AM CT (US)
You've 2 differents "freezes": - Dink is REALLY frozen (eg in an infinite loop without wait()), and so you can reset your comp. - The PLAYER is frozen, and so everything works, you just can do anything because you used a 'freeze(1);'. In this case, Dink.exe still work and can be closed using Alt+Q (it's a Dink shortcut, not a system one).I think that when you can't use Alt+Tab, then Alt+Q doesn't work... |