Jump to content

Photo

um... Noobie need help!!


  • Please log in to reply
167 replies to this topic

#106 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 06 May 2008 - 07:35 PM

I don't mind if you use my thread... (I'm not trying to get my topic past 10 pages....... icon_whistle.gif )

And, yeah, I'm not taking scripting 'too' seriously yet. icon_razz.gif

===EDIT===

Alright. I'm taking it seriously now. I am going to come up with a script of my own... and I'm not going to tell you what it is going to be for, until I'm done... or until I need help.

Edited by AgentLym, 06 May 2008 - 07:36 PM.


#107 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 06 May 2008 - 07:41 PM

heh... this will be fun XD

#108 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 06 May 2008 - 07:49 PM

Pfft! You just wait! icon_cool.gif

#109 Master Maniac

Master Maniac

    Earth, Wind, Fire, and Water.

  • Members
  • Real Name:kris

Posted 06 May 2008 - 07:52 PM

well, good luck lol. maybe, if it's good, i'll use it.

#110 Joe123

Joe123

    Retired

  • Members

Posted 07 May 2008 - 02:08 AM

It shouldn't need that line AL, what does the compiler say if you don't have it?

Also, you're declaring all of your variables at global scope.
You don't need to; declare them at script scope unless you really need to declare them at global scope.


Yes, Screen->Line.
It's in the 'Screen' section of ZScript.txt, so it uses the 'Screen->' pointer.

The 'colour' integer counts across the rows and down the colums I think.
So it starts in the top left corner, counts across the row, then goes down to the next row and counts across etc.

And I don't know anything about DrawStyle for EWeapons I'm afraid, I haven't really used them much.



EDIT: Oh yeah, the reflected fireball won't kill the guard because I didn't tell it to.
The safest way is probably just to put a 'Reflected Magic' flag on the guard's combo, and then have the script check whether it's changed or not.
Is the idea meant to be that you can kill him?

Edited by Joe123, 07 May 2008 - 02:10 AM.


#111 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 07 May 2008 - 06:27 AM

QUOTE
Is the idea meant to be that you can kill him?


Well, kinda. I wanted the guard to be invincible to everything except it's own reflected magic.

Then, once the guard is dead, I wanted it to stop moving.

And that's about it. icon_razz.gif

QUOTE
It shouldn't need that line AL, what does the compiler say if you don't have it?


It says that 'nme_health variable is undeclared' or something to that degree. 'Int nme_health' just wasn't created yet.

#112 Joe123

Joe123

    Retired

  • Members

Posted 07 May 2008 - 10:07 AM

CODE
import "std.zh"


ffc script shootingguard{
    void run(int left, int right){
    npc atk = Screen->CreateNPC(83);
    int orig = this->Data;
        while(true){
            if(Link->X <= this->X+16 && Link->X > this->X){
                    if(Link->Y < this->Y+8 && Link->Y >= this->Y) Link->InputLeft = false;
            }else if(Link->X >= this->X-16 && Link->X < this->X){
                    if(Link->Y < this->Y+8 && Link->Y >= this->Y) Link->InputRight = false;
            }else if(Link->Y >= this->Y-16 && Link->Y < this->Y){
                    if(Link->X < this->X+8 && Link->X >= this->X) Link->InputDown = false;
            }else if(Link->Y <= this->Y+16 && Link->Y > this->Y){
                    if(Link->X < this->X+8 && Link->X >= this->X) Link->InputUp = false;
            }
            if(Link->X >= left && Link->X <= right) this->X = Link->X;
            atk->X = this->X;
            atk->Y = this->Y;
            if(this->Data != orig){
                atk->HP = 0;
                Quit();
            }        
        Waitframe();
        }
    }
}


Try using that, and set the ffc's combos's inherent flag to the 'reflected magic' one, and then set up in the secret combos editor for it to change to a death animation or something when it's triggered.
I also fixed the error with that health integer.
You didn't need to declare it.

#113 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 07 May 2008 - 01:57 PM

Well, it's doing the same thing it's always been doing, and it doesn't die. (but that may be from my lack of understanding what 'inherent' flags are...)

Um... Are 'inherent flags' the flags you set in the combo's settings? (when you right click a combo and all the settings come up)

That's what I thought they were, but I've never been totally sure on the subject... icon_razz.gif

I set that flag to magic (reflected) but it still doesn't work...

=====EDIT=====

A couple questions...

1) How do you set a FFC's combo?
2) How do you denote a Link Action? I have 'Link->Action(LA_Spinning)', but I'm not sure if that's right...

I am sure that it's not right. icon_razz.gif

Edited by AgentLym, 07 May 2008 - 02:13 PM.


#114 Joe123

Joe123

    Retired

  • Members

Posted 07 May 2008 - 04:59 PM

Hrm....

This isn't the sort of thing that's easy to explain really, if you send me your quest I can show you how I'd set it up.


CODE
this->Data = combo;


CODE
Link->Action = LA_ACTION;


#115 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 07 May 2008 - 06:02 PM

Hm...

Alright. I'll pm it to ya! icon_smile.gif

This is JUST a test quest! As in, I started it to test out my scripts. icon_razz.gif

(just warning you so that when you look at it and gasp, you know why... icon_heh.gif )

#116 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 08 May 2008 - 06:20 AM

Hm...

Another question.

Say, you have a FFC whose tile you want it to be is Link's plus some number...

How would you do that?

So far my code is:
CODE
if(link_spun >= 1){
     this->Data = Link->Data+748;
     }


Apparently, Link doesn't have a variable called 'Data'.

How would I create this script?

I don't mind if it's kinda long.

====EDIT====

Another question. What does '&&=' mean?

Edited by AgentLym, 08 May 2008 - 06:24 AM.


#117 Joe123

Joe123

    Retired

  • Members

Posted 08 May 2008 - 10:21 AM

QUOTE
Apparently, Link doesn't have a variable called 'Data'.

No, he doesn't.

If you want to find what tile Link uses, go to the tilesheet and write down the number.
Simple as.
If you want it to be that number + 748, add 748 to it.

Link's tile is a constant (well, even with LTM it's still not too hard to get your head round), stop being lazy =P



'&&=' doesn't mean anything.
'&=' means 'bitwise and assignment'.

CODE
int bin1 = 001100b;
int bin2 = 111000b;
bin1 &= bin2;

return bin1; //bin1 is now 001000


so that's the same as
CODE
bin1 = bin1&bin2;

and you can also do it with decimal (and hex I assume)
CODE
int a = 5;
int b = 6;
a &= b;

return a; //a is now 4




EDIT:
Heh, I looked at your test quest.
It's perfect except for one thing.

You know how Flag 77 which you used is called 'Reflected Magic', and the one below that is called 'Reflected Fireball'?
Did it not occur to you that you might want to use the 'Reflected Fireball' one, seeing as you're reflecting fireballs? =P
Just change that flag and it's fine.

I will, however, have a look at the pseudo-solidity code, because I can see what you mean about it not working very well.
Not now though, maybe tomorrow.

Edited by Joe123, 08 May 2008 - 10:41 AM.


#118 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 08 May 2008 - 02:31 PM

QUOTE
Link's tile is a constant (well, even with LTM it's still not too hard to get your head round), stop being lazy =P


Heh. I was just hoping there would be an easier way. You just don't know what I'm trying to make yet... But I'll tell you.

I was trying to make a FFC that when Link spins on it, it'll create a ghost-clone of Link (Like in the MC or Four Swords) that'll do whatever normal Link was doing...

That'll be alot of code if I have to program when Link is attacking, summoning, changing directions, etc. So I was hoping there would be an easier way of setting a FFC to Link's sprite, but no. icon_razz.gif

QUOTE
'&&=' doesn't mean anything.


Hm. That's weird. I saw '&&=' multiple times in someone's script at AGN. I can't remember which one though. Yes I do. It's right HERE. Scroll down the code a little to find it.

QUOTE
I will, however, have a look at the pseudo-solidity code, because I can see what you mean about it not working very well.
Not now though, maybe tomorrow.


Alright. You'll have to re-import your script... Well, no. Forget it. The code ZQuest has still has the solidity in it. It's just the guard will be shooting you while you try to go through it. icon_razz.gif

QUOTE
You know how Flag 77 which you used is called 'Reflected Magic', and the one below that is called 'Reflected Fireball'?
Did it not occur to you that you might want to use the 'Reflected Fireball' one, seeing as you're reflecting fireballs? =P
Just change that flag and it's fine.


Heh. My bad. I was thinking that, but I didn't because... I don't know why I didn't try that. Sorry. icon_razz.gif

Edited by AgentLym, 08 May 2008 - 02:34 PM.


#119 Joe123

Joe123

    Retired

  • Members

Posted 08 May 2008 - 04:08 PM

Well, the way you'd do it is to set up combos for them, and make them into ffcs.
Then you reference the first one as a number (so linkcombo = 48294; or something like that), and then reference the rest after that.
So linkcombo+DIR_UP would be Link looking up, linkcombo+DIR_RIGHT would be Link looking right, and linkcombo+4+DIR_UP would be Link walking upwards.
As an example.

That's how the Epona script works anyway.


Oh well, Beefster's coding is far superior to mine, and a lot of his methods elude me still =P
It's some kind of boolean manipulation assignment, but I've never seen it before.

#120 AgentLym

AgentLym

    • Zelda and Pokémon Master •

  • Members
  • Location:Skyloft

Posted 08 May 2008 - 05:05 PM

Ah. Thanks for the tip!

And, I've been thinking on making a 'poison cloud' script for my swamp dungeon (just a purple or green 3x3 tile cloud that floats around the screen, and I've been wondering about something...

You know how FFCs have the variable 'EffectWidth' and 'EffectHeight'? Well, does the effect center around the FFC, or does it go right and down from the FFC?

Examples: * = FFC, ~ = Effect Range
CODE
*  ~  ~            ~  ~  ~
~  ~  ~     or     ~  *  ~
~  ~  ~            ~  ~  ~


I'm just wondering how it works...

Edited by AgentLym, 08 May 2008 - 05:30 PM.



1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users