Jump to content

Photo

Split on Death Script


  • Please log in to reply
28 replies to this topic

#16 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 19 June 2016 - 11:12 PM

7, 8, 9 : These allow you to use an array that is external to the functions to list enemy IDs and such, instead of hardcoding them in the function. 4, 5, and 6 have arrays in them, that you need to populate. The array format is listed as a comment, under itc, in each.

For example, original enemy, tribble enemy, number of splits, tribbles up to:

int  list[]=
{ 1,10,2,16,    5,20, 3, 100};
This is an example of inserting two definitions in the Tribble function.
Enemy 1, will turn into two enemy 10 when it dies, and those enemy 10s will tribble up to enemy 16 when their timers run down.
Enemy 5 will turn into three enemy 20 when killed. These will tribble up to enemy 100 when their timers expire.

I should note that Screen->GuyCount is unaffected, which may constitute a bug. Only testing will show if this is a problem, but I suspect that it shall be one.

10, 11: Global functions used by SplitOnHit() and ffc script SplitOnHit. They're going into my std.zh update, too.
  • Cukeman likes this

#17 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 19 June 2016 - 11:56 PM

Okay, so I added lines 9, 33 and 54-100:

 

code

 

and I got this error:

 

2ij1yz7.jpg

 

EDIT: "Line 80" is Line 33 in this post


Edited by Cukeman, 20 June 2016 - 12:14 AM.


#18 cavthena

cavthena

    Apprentice

  • Members
  • Real Name:Clayton
  • Location:I wish I knew

Posted 20 June 2016 - 12:06 AM

It's telling you it can't find the function SplitOnDeath().

 

You forgot to add the argument for SplitOnDeath() on line 33. Add in the argument it needs and that should fix it.



#19 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 20 June 2016 - 12:13 AM

It's telling you it can't find the function SplitOnDeath().

 

You forgot to add the argument for SplitOnDeath() on line 33. Add in the argument it needs and that should fix it.

 

So, change "SplitOnDeath( );" to "SplitOnDeath(int dist_flux);"?

 

When I try that it says "syntax error, unexpected float, on token int"


Edited by Cukeman, 20 June 2016 - 12:13 AM.


#20 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 20 June 2016 - 12:15 AM

Try:

SplitOnDeath(0);


#21 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 20 June 2016 - 12:23 AM

It compiles now, but the enemy died normally without splitting. Do I need to add or subtract 1 from the enemy ID numbers for counting up from 0 instead of 1 or something?



#22 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 20 June 2016 - 03:01 AM

It compiles now, but the enemy died normally without splitting. Do I need to add or subtract 1 from the enemy ID numbers for counting up from 0 instead of 1 or something?


Doing first phase debugging now. SplitOnDeath(ffc) is tested, and working thus far. I'll post again when I have verified the whole collection.
  • Cukeman likes this

#23 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 20 June 2016 - 07:26 AM

Here's an updated script. Only the ffc components are complete, as I need to reconfigure the global functions to match what I've done with the ffcs, and then test them. I may need to require using ffcscript for silent ffc control, because of the timing involved with the flow of this...
 

 

 

Code (v0.8.9)  

Demo Quest (all three ffcs)



#24 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 06 July 2016 - 08:17 PM

Saw a new update, tested it, same result. Guess you updated a different part of the submission. No worries, just puttin' the information out there. Also, I think I might have spotted a typo "//SplitOnHit fff n[]" shouldn't that be "ffc", not "fff"? On second thought it's just a comment, so not that important, it looked like part of the code on first glance.



#25 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 17 July 2016 - 05:34 AM

Saw a new update, tested it, same result. Guess you updated a different part of the submission. No worries, just puttin' the information out there. Also, I think I might have spotted a typo "//SplitOnHit fff n[]" shouldn't that be "ffc", not "fff"? On second thought it's just a comment, so not that important, it looked like part of the code on first glance.


Wait... Did I upload the wrong file? It didn't compile?

Flidd. I know that I finished it, and tested it. I must have saved the more recent version in a different path. Grumble, grumble...

#26 Cukeman

Cukeman

    "Tra la la, look for Sahasrahla. ... ... ..."

  • Banned
  • Location:Hyrule/USA

Posted 17 July 2016 - 06:25 AM

It did compile (it also compiled before), I just had this result again:

 

It compiles now, but the enemy died normally without splitting. 


Edited by Cukeman, 17 July 2016 - 06:25 AM.


#27 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 17 July 2016 - 06:56 AM

It did compile (it also compiled before), I just had this result again:


I'll either hunt for the newer file, or bring this one back up to the intended specs. I seem to recall that I had to launch an ffc to control enemy splitting (globally) in the final version, to handle timing. It's just the story of this season that I'd misplace a final version and need to remake it.

When I paused work on the shop script for JudasRising, I resumed with a file two versions outdated, as I made the newer ones on me android, and he changed the filename when sending it back to me, so my versioning scheme was broken, and I had to re-fix all the things that I had already fixed. Thankfully, I remembered all of them, and I also remembered that I had wanted to handle something more efficiently, and didn't at the time; so that gave me the chance to go in and make that revision.

Now I need only test the more advanced features, and if they pass, I'll release that script file. It's pretty brilliant, so stay tuned if you're looking for anything of that nature.
  • Cukeman likes this

#28 judasrising

judasrising

    I play guitar

  • Members
  • Location:Sweden but born in Finland

Posted 17 July 2016 - 03:21 PM

Hi ZoriaRPG

 

i notice that link in your sig split and tribble NPC link goes to the SwitchHook script


Edited by judasrising, 17 July 2016 - 03:22 PM.


#29 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 17 July 2016 - 06:58 PM

Hi ZoriaRPG
 
i notice that link in your sig split and tribble NPC link goes to the SwitchHook script


Fixed the link.


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users