PDA

View Full Version : Doppelganger Replicator



The_Amaster
12-07-2007, 06:55 PM
Okay, a couple things to keep in mind while reading this script request. First of all, it's mostly made up of basic commands. Second of all, my ultra long post isn't because the script itself is so long, so much as I want it to be really easy for whoever makes it. Finally, all values should be hardcoded, not arguments, as there are rather more than eight of them. Just leave the combo and item numbers as random values, I can change them later. It's the code around them I need. Now, on to the request...

What it looks like it does in-game: Link creates a doppelganger in front of him who is invulnerable and can swing a sword.

What it really does: Makes a combo that looks like Link, while taking away most of the real Links items and making him invulnerable.

Heres what it does, as best as I can figure.

-Check Links facing, what level ring he has, and what level shield he has.

-Move Link one tile in the direction he's facing.

-Create a combo behind him. This is a bit complicated: If Link has small shield, no ring, and is facing up, it makes one combo. If "" and he's facing left, it makes another...if Link has the Magic shield and the level 1 ring, and is facing left, it makes another...if Link has the mirror shield and level 2 ring and is facing right it makes another...
All in all, this section looks for all 36 possibilities of face, shield and ring, and adjusts as so. If anyone has a way to condense this, please let me know.

-Takes away all items in one stroke if possible. If not just create the code for one, and I'll copy paste it for each.

-Gives Link four items. (These will be the boots, a special sword, the replicator, and a ring with a value so high, he's nigh on invulnerable)

-Drains Magic at a certain rate. (Once again, I'll set the exact value, just give me the code)

Now, the script ends and link returns to his original position if one of three things happens...
-The player activates the item again.
The player runs out of magic.
-The player drowns, as checked with LA_DROWNING.



Okay, I've spelled it out so that it's the last hassle for anyone who makes it for me. Any takers?

Gleeok
12-07-2007, 07:56 PM
I dont really understand the doppleganger part. So is link the Doppleganger, or just controls it? Can Link move through all this? It might be easier to have the DG start where link is to avoid getting stuck in walls. Did you say 4 DG's, how do they move, or do they stand still? Do all of them swing a sword? Or do they move with Link? Is this too many questions? :p

The_Amaster
12-07-2007, 10:00 PM
No, sorry, theres only one doppelganger. There are four combos to represent the four possible facings, so it looks like the created combo is original Link. Look, heres how it would be ideally: A combo is created in front of Link that looks and moves like him, and can swing a sword. But this is far too complex. So, I figure, why not just have Link look like the doppelganger with Link Tile Mods. The second Link, the created one just sits there while the effect is on. The whole point isn't to have two controllable Links, it's to be able to cross spikes and avoid enemies, but in a far cooler way than the boots.

Oh, yeah, and I was thinking some ind of check for solidity in front of link before all of this, that cancels the effect if he's in front of a wall.

The_Amaster
12-14-2007, 09:49 AM
*bump*

I could really use this.

symbiote
01-02-2008, 08:27 AM
This reminds me of the original Prince of Persia 2 (side-scroll action!) where the Prince turned into his shadow, and was able to make a jump he otherwise could not have accomplished to get the flame-thing (primary purpose of that stage). Then he had to get back to his body before the guards showed up.

I know, not helping. Sorry.

However, if the spell/item/whatever that triggers this effect limited Link by facing him down, there's a third of your variables taken care of. Create a sleeping/unconscious tile of Link directly beneath him, and change his (actual) sprites to a shadowy version (or whatever), and you're almost there!. I know, I know, still a lot of idea, and no real answer. I'm just trying to look at it from a different perspective.

Polymorph
01-04-2008, 07:22 PM
Yes, but what if you (as the shadow) leave the screen?

Gleeok
01-04-2008, 10:00 PM
Well Amaster, the simplest thing to do would use drawtile to create a transparent link then move that around. This would be very buggy I'm guessing and would probably break the zelda game format. Next easy thing would be to give Link items, and so it appears it's not really Link, but you can't really "avoid enemies" without giving him the clock item. You can add 100 say to his HP or something but again, y'know. An ffc Link might require you to 'redo' every single game screen because script walkability can only check solid combos on layer 0, and I really don't know how to go about triggering all kinds of secret or item flags you may have set up with a ffc link.

How about a nice lv2 wand that can paralyze up to 4 enemies or something. I've already scripted that. Or maybe the metal saw from MM2? I've got one of those laying around. I've also got a cool "super death beam laser" item that can randomly instantly kill any enemy...:shrug:

The_Amaster
01-04-2008, 10:15 PM
Sorry, I'm not explaining clearly. In theory this should be a really simple script. It just needs to make a few combos and give and take items.

Gleeok, your first idea was what I first thought of, but the problem is I need to be able to swing Link's sword as well. Thus my idea was to take away every item besides the sword, and give him the boots, which I would attatch a Link Tile Mod to. As for enemies, well, thats easy. Just give him a ring with no color mod and a huge divisor number. If every enemy only does a 256th point of damage, it looks like he isn't recieving any. As for the whole "facing and shield" check thing, well my problem there was how to make it look like Link didn't really move. My solution was to make a combo that looks like him, but I needed it's appearance to change according to his direction and shield to look accurate.

Gleeok
01-04-2008, 10:22 PM
Ah, Ok. So what items will get taken away? And how do you want Link to "return to normal"?

The_Amaster
01-04-2008, 10:32 PM
If theres a way to clear his entire inventory, then we can use that. If not, then if you put in the code to remove one and mark it I'll copy-paste and modify it for the ones I need. As for the end, if possible...

-Drains Magic at a certain rate. (Once again, I'll set the exact value, just give me the code)

Now, the script ends and link returns to his original position if one of three things happens...
-The player activates the item again.
The player runs out of magic.
-The player drowns, as checked with LA_DROWNING.

Gleeok
01-05-2008, 11:11 PM
OK, I think should work fine. Feel free to ask any questions.

Also; What ffc would you permanently want to use as Link? 32 maybe? I'll add that part later. I gotta run right now.




// pickup scripts

item script pickup1{
void run(){
item_a = true;
}
}

item script pickup2{
void run(){
item_b = true;
}
}

item script pickup3{
void run(){
item_c = true;
}
}

item script pickup4{
void run(){
item_d = true;
}
}

//GLOBAL VARS --------------------------
bool dop_is_active = false;

bool item_a = false; //you need to attach pickup scripts to all these items
bool item_b = false; //unless you want link to start with it, then set that one to true
bool item_c = false;
bool item_d = false;

int a = 0; //set the id's here
int b = 0;
int c = 0;
int d = 0;
int e = 0;
int f = 0;

int ring = 0; // the 256 damage divisor ring

int a1 = 0; // id's to give when used
int b1 = 0;

//--------------------------------------

item script dop{
void run(){

if(dop_is_active==false){

dop_is_active==true;
Link->Item[ring]==true;

if(Link->Item[a])Link->Item[a]==false;
if(Link->Item[b])Link->Item[b]==false;
if(Link->Item[c])Link->Item[c]==false;
if(Link->Item[d])Link->Item[d]==false;

// copy/paste as needed

if(Link->Item[a1]==false)Link->Item[a1]==true;
if(Link->Item[b1]==false)Link->Item[b1]==true;

}
else { // is true

dop_is_active==false;
Link->Item[ring]==false;

if(Link->Item[a]==false && item_a)Link->Item[a]==true;
if(Link->Item[b]==false && item_b)Link->Item[b]==true;
if(Link->Item[c]==false && item_c)Link->Item[c]==true;
if(Link->Item[d]==false && item_d)Link->Item[d]==true;


if(Link->Item[a1])Link->Item[a1]==false;
if(Link->Item[b1])Link->Item[b1]==false;
}
}
}




global script glob{
void run(){
while(true){

//if you have another global script then cut here ------>8------

if(dop_is_active){

if(Link->MP==0 || Link->Action == LA_DROWNING){

//the else code of the item -------
//script is copy/pasted here!------

dop_is_active==false;
}

Link->MP -= 1; //mp drain rate
}
Waitframe();
}
}
}

The_Amaster
01-06-2008, 12:06 PM
Okay, just a few. You have me set A and A1. It looks like A1 is the given items, so, is A the items it takes away?
And I don't quite understand what the pickup scripts are for.
Also, how unfinished is it, as evidenced by your "I gotta run"?
And finally, thank you sooo much. I really needed this.

EDIT: Nevermind, I just looked at it harder and answered the first question myself. The other two still stand though.

Polymorph
01-06-2008, 06:11 PM
I think the pickup scripts are what items you keep. (or get.)

Gleeok
01-25-2008, 10:38 PM
Nuts, I forgot all about this. Did you get it working how you wanted it? What's the leftover damage that needs to be improved or finished?

The_Amaster
01-30-2008, 04:59 PM
Okay, Gleeok, this looks really good. If you can just have it create FFC 32(works as well as any) where Link was standing at the time of activation. Only how do I get it to be invisible until he activates? And then that should be it. :D

EDIT: Okay, it compiles fine (which makes sense) but it doesn't seem to do anything. I have it set up to take away the sword, candle and boomerang. Now, I've entered those item values into the script, and given each the corosponding pickup script.
You, know what, I'm just going to attach my test-quest. Umm, there are some other scripts above it, so you may need to scroll down a bit.
Download (http://www.mediafire.com/?beyyfte2zag)

Gleeok
02-04-2008, 05:30 AM
What version is that for? ...Oh wait, it's probably the newest one...I'll have to check it out.....

..yeah, I'll see what the problem is.


..I just thought of something cool...An item that gives you a fire Gleeok attack...fire breath!

Ooh, i've got another: Homing bombs...bomchu's! ...wait, i've basically got that one already....clash man. That's like the same thing.