Jump to content

Photo

What is the coding for gradual until reaching a certain point?


  • Please log in to reply
2 replies to this topic

#1 LikeLike888

LikeLike888

    Spicy food lover!!

  • Members
  • Real Name:Jason
  • Location:North America

Posted 02 March 2018 - 09:09 PM

Such as

A1:

do
{
  arrows_I_can_use += 1;
} until (arrows_I_can_use = 15)

 

or

B1:

do
{
  blue_bombs_I_can_use += 1;
} until (bombs_I_can_use = maximum_blue_bombs_I_can_have)

 

or

C1:

do
{
  [CR_LIFE] -= 1;
} until [CR_LIFE] = 0

 

or

D1:

do
{
  variable apples += 13
} until variable apples = 39

 

or

E1:

do
{
  rupees_I_have += 1;
} until rupees = maximum_rupees_I_can_have

 

or

F1:

do
{
  rupees_I_have += 1;
} until rupees amount gets increased by 17

 

 

 

 

 

By the way what are the ZScript codings for

Maximum blue bombs

Blue bombs

Red bombs

Maximum red bombs

Maximum arrows

Arrows

Link's Magic

Maximum Link's Magic

Maximum Link's Health

Link's Health

Rupees

Maximum Rupees

etc.



#2 James24

James24

    Adept

  • Banned
  • Real Name:James
  • Location:Australia

Posted 02 March 2018 - 09:15 PM

Why bother with gradual increments when you can just set the value to whatever you want?  If you want the player to be able to do anything between increments, then you need waitframe for a certain period of time between increments.


  • LikeLike888 likes this

#3 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 02 March 2018 - 11:35 PM

Try using Game->DCounter[] for this.

 

Game->DCounter[CR_RUPEES]+=17; This would gradually fill it by 17.


Max counter is game->MCounter[]. See std_constants.zh for the counter constants to use with the Counter[], DCounter[], and MCounter[] arrays.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users