Jump to content

Photo

What text code showing website is this please?


  • Please log in to reply
2 replies to this topic

#1 LikeLike888

LikeLike888

    Spicy food lover!!

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

Posted 26 March 2019 - 07:27 PM

PM stands for Private Message

 

 

 

MB stands for Mega Bytes

 

 

 

GML stands for Game Maker Language

 

 

 

You can also PM me if you wish.

 

 

 

Anyways what text code showing website is this:

A one time free of about $40 or $49.99 or something like that a user can post up to 10 MB of text for each upload. But each uploaded code is both copyable and pasteable.

 

 

 

Reason I am asking is because I want a  simple copy and paste GML tutorials that people can copy and paste from my codings and learn from them such as how to do working if relative like below for example.

 

 

 

Create Event:
Melissa_hp = 17; //variable Melissa_hp is equal to 17
Melissa_hp_divided_by = 1; //will be used for help in dividing Melissa_hp please see Step Event
Melissa_hp_minus = 0; //will be used for reducing Melissa_hp please see Step Event
Melissa_hp_plus = 0; //will be used for increasing Melissa_hp please see Step Event
Melissa_hp_times_by = 1; //will be used for multiplying Melissa_hp please see Step Event
 
 
 
Step Event:
if (Melissa_hp_times_by > 1) //if variable Melissa_hp_times_by is greater (higher) than 1
{
  Melissa_hp *= Melissa_hp_times_by; //variable Melissa_hp gets multiplied by how much variable Melissa_hp_times_by is equal to
  Melissa_hp_times_by = 1; //variable Melissa_hp_times_by now becomes equal to 1 again
}
if (Melissa_hp_plus > 0) //if variable Melissa_hp_plus is greater than 1
{
  Melissa_hp += Melissa_hp_plus; //variable Melissa_hp gets increased by whatever variable Melissa_hp_plus is equal to
  Melissa_hp_plus = 0; //variable Melissa_hp_plus becomes 0
}
if (Melissa_hp_minus > 0) //if variable Melissa_hp_minus is greater than 0
{
  Melissa_hp -= Melissa_hp_minus; //variable Melissa_hp gets reduced by what variable Melissa_hp_minus is equal to
  Melissa_hp_minus = 0; //variable Melissa_hp_minus is equal to 0
}
if (Melissa_hp_divided_by > 1) //if variable Melissa_hp_divided_by is greater than 1
{
  Melissa_hp /= Melissa_hp_divided_by; //Variable Melissa_hp gets divided by whatever variable Melissa_hp_divided_by is equal to
  Melissa_hp_divided_by = 1; //variable Melissa_hp_divided_by is equal to 1
}
if (Melissa_hp_divided_by == 5) //if variable Melissa_hp_divided_by is equal to 5
{
  x += 5; //go right by 5 pixels
}
if (Melissa_hp_minus == 5) //if variable Melissa_hp_minus is equal to 5
{
  y -= 5; //go up by 5 pixels
}
if (Melissa_hp_plus == 5) //if variable Melissa_hp_plus is equal to 5
{
  y += 5; //go down by 5 pixels
}
if (Melissa_hp_times_by == 5) //if variable Melissa_hp_times_by is equal to 5
{
  x -= 5; //go left by 5 pixels
}
 
 
 
T Press Event:
Melissa_hp_times_by = 5; //variable Melissa_hp_times_by is equal to 5
 
 
 
P Press Event
Melissa_hp_plus = 5; //variable Melissa_hp_plus is equal to 5
 
 
 
M Press Event
Melissa_hp_minus = 5; //variable Melissa_hp_minus is equal to 5
 
 
 
D Press Event
Melissa_hp_divided_by = 5; //variable Melissa_hp_divided_by is equal to 5
 
 
 
Draw Event
draw_sprite(Melissa_Sprite,-1,x,y); //draws Melissa_Sprite at own x and y position cycling through images if need be
draw_text(x,y+sprite_height+17,"Melissa_hp: "+string(Melissa_hp); //at 17 pixels below self draw text


#2 Gleeok

Gleeok

    It's dangerous to dough alone, bake this.

  • Members
  • Real Name:Pillsbury
  • Location:Magical Land of Dough

Posted 27 March 2019 - 02:29 AM

Uhh... post them for free at the Game Maker forums?

#3 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 02 April 2019 - 08:24 AM

Anyways what text code showing website is this:
A one time free of about $40 or $49.99 or something like that a user can post up to 10 MB of text for each upload. But each uploaded code is both copyable and pasteable.
 
 
 
Reason I am asking is because I want a  simple copy and paste GML tutorials that people can copy and paste from my codings and learn from them such as how to do working if relative like below for example.
 
 
 
 

Create Event:
Melissa_hp = 17; //variable Melissa_hp is equal to 17
Melissa_hp_divided_by = 1; //will be used for help in dividing Melissa_hp please see Step Event
Melissa_hp_minus = 0; //will be used for reducing Melissa_hp please see Step Event
Melissa_hp_plus = 0; //will be used for increasing Melissa_hp please see Step Event
Melissa_hp_times_by = 1; //will be used for multiplying Melissa_hp please see Step Event
 



I use Pastebin, and GitHub. GitHub and the git software toolchain are probably your best option.

I'm not overly fond of GML. It is probably good at what it does but it lacks some courtesy features such as structs, for no apparent reason.

Also there really isn't a good reason to code comment every line when the code identifiers state what they are doing:
 

if (Melissa_hp_divided_by == 5) //if variable Melissa_hp_divided_by is equal to 5

Do you think that if (Melissa_hp_divided_by == 5) is in any way ambiguous?

I'm not entirely sure why you need all of those variables anyway.

If you build around code comments and your identifiers and syntax provide the same level of detail, then the code comment itself just adds clutter.

If you had something like this:

if ( ( a[15] / 2 ) == 5 ) then yes absolutely put a comment on what the heck that is doing.
 

I'd also advise using shorter identifiers for some of this, or using an array for these connected values. 

 

 

IDK what the GML equivalent for this would be:

enum hpevents { hpe_none_none, add, reduce, multiply, divide, last };
s32 hpEvent[last] = { 0, 0,0,0,0 }; 
hpevents melissaHP = hpe_none; 
 
if ( melissaHP == add ) { hp += hpEvent[add]; hpEvent[add] = 0; }

That also seems overly complicated but it'd be a tidier system. IDK why you need specific events for these things, nor why you need to check the exact value to do anything. In general, you only need to check HP to see if the player is dying, or if the counter is at its cap. 

 

The latter is the only real reason to have an events handler for adjusting it upward. 


 

MB stands for Mega Bytes

 

Not to be confused with Milton-Bradley; Motherboard; or Mb (Mega bits). :D

 

PM stands for Private Message

 

...or Prime Minister. Context is everything.


  • Twilight Knight likes this


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users