The Dink Network

Dead bonca carcass

April 10th 2007, 11:46 PM
bonca.gif
MichaelV
Peasant He/Him Australia
It's all in the mind, you know 
I want to make it so that the carcass of a bonca that Dink kills remains behind after he leaves the screen, and then have him be able to remove it later (as part of a sort of quest). I've had a look at scripts which do similar things (eg. barrels, pushable rocks that stay), but haven't had much luck adapting them to what I want here, which is: Bonca -> Dink kills it -> Leaves carcass (which Dink can talk/hit) -> Dink 'removes' carcass by talking

Any help?

April 11th 2007, 02:55 AM
slimeg.gif
metatarasal
Bard He/Him Netherlands
I object 
I've done that in the past in the Scourger.
I remember using three global variables to actually make it work. One for the body's x value, one for its y value and one for whether or not it should be present (the normal story variable).

It works pretty much like this: A script attached to a room determines whether a body or a slayer should be drawn, in the die procedure add this: (for a slayer, taken from the Scourger)

//Globals for the x and y posistions:
&slayx = sp_x(&current_sprite,-1);
&slayy = sp_y(&current_sprite,-1);
//Creating of the body:
int &junk = create_sprite(&slayx,&slayy,0,645,1);
//I need to make a cutscene or something when Dink touches the body:
sp_touch_damage(&junk,-1);
sp_script(&junk,"s4-corpse");
//Let's make sure the 'normal' body isn't drawn:
sp_active(&current_sprite,0);

<EDIT>
And don't forget to do something similar in the room's script.
April 11th 2007, 03:50 AM
duckdie.gif
Hasai
Peasant He/Him Finland
I want to have your abortion 
If you don't want to use any global variables, you may be able to use the editor_seq, editor_frame commands to store the x/y location. The editor_type information could show if the bonca was actually dead - then you'd load your quest script with the provided coordinates.
April 11th 2007, 07:04 AM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
I used editor_frame and editor_seq in Initiation to store where a corpse was, so you may want to check out the scripts for the cast guards and other NPCs for an example. One thing to note is editor_frame only accepts values from 0-255, so you have to divide the y coordinate by two and put it in there, then multiply it by two when you retrieve it.

Or, you could just place the Bonca in Vision 1, and the corpse in Vision 2, and use a base script attached to the screen to toggle between the two, if you don't care about the exact position that the Bonca was killed at. I believe that Prophecy of the Ancients used this technique.
April 11th 2007, 09:49 AM
bonca.gif
MichaelV
Peasant He/Him Australia
It's all in the mind, you know 
At the moment I'm using the barrel-stay-flat script section, which works pretty similar to the vision method.
However, it won't let me talk or run the touch procedure after it's dead. I've used a global variable to say when it's dead (that variable already is a part of the story anyway), and then in main have the touch damage = -1, as well as for the talk function. I've tried changing the editor_type to both background and normal, but it doesn't change it.
If there's no easy fix I'll just use the vision method; it seems pretty easy to implement.

P.S. Thanks for all the help
April 11th 2007, 01:10 PM
bonca.gif
Erwin
Peasant He/Him Netherlands
Friendship is magic 
WHAT?! This is no dead bonca carcass cult?! NOOOOOOOO!!
April 12th 2007, 05:01 AM
bonca.gif
MichaelV
Peasant He/Him Australia
It's all in the mind, you know 
Hmmm, a good idea for my D-Mod...

...or too cheesy?

(mmmmmm, cheeeeseeey...)
April 13th 2007, 01:51 AM
wizardb.gif
Endy
Peasant He/Him United States
 
DDC vs DBC

Who would win?
April 13th 2007, 11:55 AM
burntree.gif
Striker
Noble She/Her United States
Daniel, there are clowns. 
DDC has worshipers who kill. DBC only has maggots and flies.