| View previous topic :: View next topic |
| Author |
Message |
PurpleSquerkle Supreme Cookiemancer


Joined: 28 Oct 2007 Age: 17 Posts: 4356 Location: Midwestern US
|
Posted: Mon May 19, 2008 10:59 pm Post subject: "Finale" Scripting |
|
|
OK, so I think it'll be something like this:
| Code: |
SetTargetToWhoeverBumped
{check if target has less than 20% of their health}
tmpargument={fancy particles}
SpawnExactParticle
KillTarget |
So really simple.
Just don't know how to check health percentage.
Or can I do that?
Oh, and I also need a bit of help with checking a bunch of things at once. How would I make it so that something happens if it has a skill ID or is a certain class or is a certain other class?
I need this for the mana potion scripting, because unless something has changed, there is no skill ID for Divine magic.
Thinking about it now, how did I come this far with such a (relatively) feeble grasp of the scripting system?  _________________
+ PurpleSquerkle
--My website--
Latest update= 7/15/08; Three new midi loops.
{new Squerkle coming as soon as I stop being lazy} |
|
| Back to top |
|
 |
Zefz Lead Designer


Joined: 16 Sep 2007 Posts: 2301 Location: Norway
|
Posted: Tue May 20, 2008 5:53 am Post subject: |
|
|
| Code: |
tmpx = targetlife > 8
tmpy = 2 //2 life left
IfXIsLessThanY
|
| Code: |
tmpargument = [WMAG]
IfTargetHasSkillID //Arcane magic
tmpargument = [WIZA]
IfTargetHasID //Target is wizard
|
_________________ http://egoboo.sourceforge.net
"The pen is mightier than the sword- IF it is sharpened, dipped in poison and thrown really really hard at your target. But seriously, you are better off with a sword." |
|
| Back to top |
|
 |
PurpleSquerkle Supreme Cookiemancer


Joined: 28 Oct 2007 Age: 17 Posts: 4356 Location: Midwestern US
|
Posted: Tue May 20, 2008 12:28 pm Post subject: |
|
|
| Code: |
tmpx = targetlife > 8
tmpy = 2 //2 life left
IfXIsLessThanY
|
But doesn't this just check if it has a certain amount of life left? Is there a way to do percentage, or will I have to stick with this?
| Code: |
tmpargument = [WMAG]
IfTargetHasSkillID //Arcane magic
tmpargument = [WIZA]
IfTargetHasID //Target is wizard
|
n
And that won't check if it has WMAG and WIZA? It'll check if it has one or the other?
So I could do:
| Code: | mpargument = [WMAG]
IfTargetHasSkillID
tmpargument = [HEAL] //may have gotten the IDSZ wrong, but whatever.
IfTargetHasID
tmpargument = [PALA] // ' '
IfTargetHasID
{heal mana and maybe show a message}
Else
tmpargument= {messagenumber}
ShowMessageNear {or whatever it is} //Yuck! This stuff is awful! In retrospect, driking random liquids in mysterious bottles is probably a really stupid idea. |
...and that would work? _________________
+ PurpleSquerkle
--My website--
Latest update= 7/15/08; Three new midi loops.
{new Squerkle coming as soon as I stop being lazy} |
|
| Back to top |
|
 |
Chainsaw Lumberjack


Joined: 20 Oct 2007 Age: 15 Posts: 2378 Location: Israel
|
Posted: Tue May 20, 2008 1:18 pm Post subject: |
|
|
Wouldn't it be much easier if you would just check to see if a character has at least 1 point of max mana? _________________ "To err is human, to really mess up requires a computer."
Chainsaw's Cell [Last update: 27th May '08]
 |
|
| Back to top |
|
 |
PurpleSquerkle Supreme Cookiemancer


Joined: 28 Oct 2007 Age: 17 Posts: 4356 Location: Midwestern US
|
Posted: Tue May 20, 2008 1:33 pm Post subject: |
|
|
No.
It already works that way: potions do nothing if you do not have mana.
Mana potions aren't supposed to restore Psychokinesis mana, Nature mana, or any other kind of mana we may have in the future. Just Divine and Arcane. _________________
+ PurpleSquerkle
--My website--
Latest update= 7/15/08; Three new midi loops.
{new Squerkle coming as soon as I stop being lazy} |
|
| Back to top |
|
 |
Chainsaw Lumberjack


Joined: 20 Oct 2007 Age: 15 Posts: 2378 Location: Israel
|
Posted: Tue May 20, 2008 1:43 pm Post subject: |
|
|
I think it should look something like this then:
| Code: |
tmpargument = [WMAG]
IfTargetHasSkillID
<Recover mana>
Else
tmpargument = [HMAG] // Use this instead of Healer/Paladin tags.
IfTargetHasID
<Recover mana>
Else
<Show yucky message> |
_________________ "To err is human, to really mess up requires a computer."
Chainsaw's Cell [Last update: 27th May '08]
 |
|
| Back to top |
|
 |
PurpleSquerkle Supreme Cookiemancer


Joined: 28 Oct 2007 Age: 17 Posts: 4356 Location: Midwestern US
|
Posted: Tue May 20, 2008 2:28 pm Post subject: |
|
|
Yeah, I was thinking that too. Could just copy the script and do it multiple times for each check.
I'll try that then.
Oh, but there really is a skill for Divine magic now? That must have been added with the new skill system.
Back in the day they didn't need one, because relics just checked for class (Paladins can't use all of them). _________________
+ PurpleSquerkle
--My website--
Latest update= 7/15/08; Three new midi loops.
{new Squerkle coming as soon as I stop being lazy} |
|
| Back to top |
|
 |
Zefz Lead Designer


Joined: 16 Sep 2007 Posts: 2301 Location: Norway
|
Posted: Tue May 20, 2008 2:30 pm Post subject: |
|
|
What he said.
In addition I dont think there is a way to check life precentage. But I could add it in... _________________ http://egoboo.sourceforge.net
"The pen is mightier than the sword- IF it is sharpened, dipped in poison and thrown really really hard at your target. But seriously, you are better off with a sword." |
|
| Back to top |
|
 |
PurpleSquerkle Supreme Cookiemancer


Joined: 28 Oct 2007 Age: 17 Posts: 4356 Location: Midwestern US
|
Posted: Tue May 20, 2008 2:32 pm Post subject: |
|
|
That'd be nice.
But not until flight scripting is fully enabled.
I remember you originally made it check if you were jumping, but the script would then not work, since as soon as you were levitating, you would no longer be jumping.
Now, though, it can check for the press of the actual key, right? So it'll work? What version is that in? _________________
+ PurpleSquerkle
--My website--
Latest update= 7/15/08; Three new midi loops.
{new Squerkle coming as soon as I stop being lazy} |
|
| Back to top |
|
 |
Chainsaw Lumberjack


Joined: 20 Oct 2007 Age: 15 Posts: 2378 Location: Israel
|
Posted: Tue May 20, 2008 2:33 pm Post subject: |
|
|
| Zefz wrote: | What he said.
In addition I dont think there is a way to check life precentage. But I could add it in... |
Oh, please do, I could use if for an object I've made. _________________ "To err is human, to really mess up requires a computer."
Chainsaw's Cell [Last update: 27th May '08]
 |
|
| Back to top |
|
 |
Zefz Lead Designer


Joined: 16 Sep 2007 Posts: 2301 Location: Norway
|
Posted: Tue May 20, 2008 2:38 pm Post subject: |
|
|
Should be in the latest trunk.
Btw some very nice work on your site Chainsaw. I've been adding a couple of things of them into the game already.
Come to think of it we are missing a title image for the Archaeologist. It's a difficult one, since it is a Starter and thus should have a image of the archaeologist. _________________ http://egoboo.sourceforge.net
"The pen is mightier than the sword- IF it is sharpened, dipped in poison and thrown really really hard at your target. But seriously, you are better off with a sword." |
|
| Back to top |
|
 |
Chainsaw Lumberjack


Joined: 20 Oct 2007 Age: 15 Posts: 2378 Location: Israel
|
Posted: Tue May 20, 2008 2:46 pm Post subject: |
|
|
Thanks, I'm glad to hear that.
As for the Archaeologist title, I'll try making it this weekend, but it won't be as good as the Snake or the Penguin one, the program I used back then won't work for me anymore... _________________ "To err is human, to really mess up requires a computer."
Chainsaw's Cell [Last update: 27th May '08]
 |
|
| Back to top |
|
 |
PurpleSquerkle Supreme Cookiemancer


Joined: 28 Oct 2007 Age: 17 Posts: 4356 Location: Midwestern US
|
Posted: Tue May 20, 2008 3:03 pm Post subject: |
|
|
| Zefz wrote: | | Should be in the latest trunk. |
Trunk? On the SVN? Or just the latest development release? Or even stable?
I don't know all this trendy net lingo!
And, whoah, Chainsaw, your website is awesome. It has inspired me to make mine actually look decent. _________________
+ PurpleSquerkle
--My website--
Latest update= 7/15/08; Three new midi loops.
{new Squerkle coming as soon as I stop being lazy} |
|
| Back to top |
|
 |
Zefz Lead Designer


Joined: 16 Sep 2007 Posts: 2301 Location: Norway
|
Posted: Tue May 20, 2008 3:33 pm Post subject: |
|
|
I was refering to the latest trunk on the SVN yes. _________________ http://egoboo.sourceforge.net
"The pen is mightier than the sword- IF it is sharpened, dipped in poison and thrown really really hard at your target. But seriously, you are better off with a sword." |
|
| Back to top |
|
 |
PurpleSquerkle Supreme Cookiemancer


Joined: 28 Oct 2007 Age: 17 Posts: 4356 Location: Midwestern US
|
Posted: Tue May 20, 2008 10:24 pm Post subject: |
|
|
I finished it, but I can't test it, as I don't have the game yet (I'm going to download it now, but someone may as well test it right away)
If it works, I'll copy the same script for the mind node and mana herbs.
http://www.freewebs.com/purplesquerkle/mpotion.zip _________________
+ PurpleSquerkle
--My website--
Latest update= 7/15/08; Three new midi loops.
{new Squerkle coming as soon as I stop being lazy} |
|
| Back to top |
|
 |
|