Jump to content


Photo

D&d Actions And Their Code Equivalents


  • This topic is locked This topic is locked
147 replies to this topic

#31 JDD

JDD

    GMC Member

  • New Member
  • 1 posts

Posted 19 February 2008 - 08:35 PM

I found on the html version of D&D to gml 7 main2 tab the change sprite icon is different than in the game.
  • 0

#32 kake_fisk

kake_fisk

    GMC Member

  • GMC Member
  • 2392 posts
  • Version:GM7

Posted 24 February 2008 - 01:25 PM

in the open webpage you have a spelling error.
you need to have http:// you had http//
  • 0

#33 Nelson

Nelson

    GMC Member

  • New Member
  • 508 posts

Posted 28 February 2008 - 03:05 AM

Same stuff is in the help file. I Suggest to use the actions codes for the D&D because that is what the actions codes are. You will need to do some testing and stuff but if you do then you will learn about stuff also.

Somebody ask what is faster the D&D or GML. Some say GML is Faster. some say D&D is faster some say they are the same because D&D is just GML code.

I say D&D is faster. Let me explain why. If you use theses codes that Ablach blackrat has in this tutorial. These codes are a lot longer than the codes the D&D icons uses. The D&D uses the action codes and not the codes in this tutorial or the help file.

So if you use these codes then Game Maker will take longer to go through codes that is longer than the codes that is in the D&D codes which is the Action codes. But there is no help on them so you have to work them functions out yourself. I done a few myself and they worked fine.
  • 0

#34 Big J

Big J

    GMC Member

  • GMC Member
  • 2848 posts
  • Version:GM8.1

Posted 28 February 2008 - 10:52 AM

D&D might be a little bit faster, but the speed difference is negligible.

The action_* functions are completely undocumented in the help file, so I discourage their use. However, if it helps a new user see the connection between D&D and GML, then so be it.
  • 0

#35 Nelson

Nelson

    GMC Member

  • New Member
  • 508 posts

Posted 28 February 2008 - 03:32 PM

Everybody has their opinion on this but most want to learn things and codes that will be faster in game play is what is at hand. But like you and I both said. the are not in the help file or any other file. I did a few my self and will try to work out a few more. I am slightly retarded and I worked out a few my self. So if I can do it a little then I know some that is smarter than me should be able to do them. I will try to see what I can do then maybe redo my D&D to code converter. I did a few in it already. and will try to work out a few more
  • 0

#36 kake_fisk

kake_fisk

    GMC Member

  • GMC Member
  • 2392 posts
  • Version:GM7

Posted 28 February 2008 - 03:35 PM

If you make a lib for your own use, you will learn gml and it will also be faster to just drop the code you want into the object :ph34r:
  • 0

#37 Nelson

Nelson

    GMC Member

  • New Member
  • 508 posts

Posted 28 February 2008 - 09:40 PM

still will want to use the action codes for the lib. But just the same. Most people just want to learn so the lib will be something that is worked out for them.

I will try to workout some of the codes myself and then maybe post them here or just redo my D&D to code converter.
  • 0

#38 Virus2_0

Virus2_0

    Penguin Programmer

  • New Member
  • 476 posts

Posted 05 March 2008 - 03:24 AM

spelling error? you mean where it says

they're are

which basicly means they are are? if thats not what ur talking about, im smart. if it is, im still smart. :P

Xtreme0 :unsure:

<{POST_SNAPBACK}>



Guiys thatis not speling... its grammmer. goshget it it rihgt. im perfecT.
  • 0

#39 AC-426

AC-426

    GMC Member

  • New Member
  • 400 posts

Posted 14 March 2008 - 03:37 PM

Thanks a lot, Ablach Blackrat. Your efforts are very appreciated.


The same nothing different. When is somebody going to do a Document on the Action codes. Any body can look in the help file and find this info. The actions codes are not in the help file so they are what will make this better not what people can find in the help file. Come on somebody put stuff that will actually help people

Where in the official GM7 help file do you find GML codes that are equivalent of the D&D actions?

Somebody ask what is faster the D&D or GML [...]
I say D&D is faster. Let me explain why. If you use theses codes that Ablach blackrat has in this tutorial. These codes are a lot longer than the codes the D&D icons uses. The D&D uses the action codes and not the codes in this tutorial or the help file.

So if you use these codes then Game Maker will take longer to go through codes that is longer than the codes that is in the D&D codes which is the Action codes.

Non-sense. You don't actually think that Game Maker leaves the GML code as you originally wrote it and that it keeps interpreting it each frame, do you? I haven't seen GM's source code, but I'm pretty sure the GML code is converted to something GM can read much quicker. Whether you use GML or D&D, they'll probably end up looking exactly the same.

For example:

action_move(90, 3) => [1, 90, 3];
action_move_point(10, 20, 5) => [2, 10, 20, 5];
and so on...

Lame example. But still, it would be A LOT faster than parsing strings every frame.
  • 0

#40 Nelson

Nelson

    GMC Member

  • New Member
  • 508 posts

Posted 14 March 2008 - 05:01 PM

You will need to look at the action codes and see what is shorter. Action codes can be shorter than the codes found in the help file. people can come up with argument after argument about what is faster and what is not. If a code is. It is suppose to be Drag and drop to code conversion which is wrong cause the D&D doesn't use the codes found in the help file. It uses the action codes.


Example

Create Moving'
//No equivalent, but you can use the following code.
ID = instance_create(x,y,object1);
with (ID) motion_set(direction,speed);


No equivalent. wrong the equivalent is

action_create_object_motion(Object,x,y,speed,direc
tion)

Edited by Nelson, 14 March 2008 - 05:22 PM.

  • 0

#41 Big J

Big J

    GMC Member

  • GMC Member
  • 2848 posts
  • Version:GM8.1

Posted 15 March 2008 - 11:54 PM

They are both equivalents.

This will get the job done as well:
with (instance_create(x,y,object))
    motion_set(direction,speed);

  • 0

#42 Nelson

Nelson

    GMC Member

  • New Member
  • 508 posts

Posted 16 March 2008 - 01:25 AM

Yes one is the code that is actually the drag and drop equivalent. That is the action code I have and the other is codes you can find in the help file.


The difference is one has two lines of code and one is just one line of code.




with (instance_create(x,y,object))
motion_set(direction,speed);


action_create_object_motion(Object,x,y,speed,direc
tion)
  • 0

#43 Big J

Big J

    GMC Member

  • GMC Member
  • 2848 posts
  • Version:GM8.1

Posted 16 March 2008 - 12:56 PM

I see. The number of lines doesn't really concern me too much.
  • 0

#44 Nelson

Nelson

    GMC Member

  • New Member
  • 508 posts

Posted 16 March 2008 - 07:28 PM

Me either but the subject is Drag and code and their equivalent. The equivalent of all drag and drop icons are the action codes not the codes found in the help file.

I know the whole purpose is teaching GML and the codes in the help file gives them something to look back to and learn from them. So in all learning the GML codes then these codes will teach one to use the codes in the help file but do not call them Drag and drop codes equivalent to their GML because they aren't that. If anything say they are Drag and drop to code translated to GML codes.

Or just teach them how to find the answer themself
  • 0

#45 pencillio

pencillio

    GMC Member

  • New Member
  • 955 posts

Posted 30 March 2008 - 08:18 PM

Thanks, this is really useful!
  • 0

#46 a1pha

a1pha

    GMC Member

  • New Member
  • 26 posts

Posted 15 April 2008 - 05:09 AM

Thanks, It's very helpful, especially the part about using "with"- that was stumping me.

Question- Do "events" have codes?
  • 0

#47 Dom83

Dom83

    GMC Member

  • GMC Member
  • 138 posts

Posted 21 April 2008 - 01:59 PM

Hi

I don't understand how to use "action_color();"

I tried several ways :

action_color(#E9CEA9);
action_color(E9CEA9);
action_color(233, 206, 169);

but I get an error. :D

Please help me.

Edited by Dom83, 21 April 2008 - 02:03 PM.

  • 0

#48 Big J

Big J

    GMC Member

  • GMC Member
  • 2848 posts
  • Version:GM8.1

Posted 22 April 2008 - 03:05 AM

Hi

I don't understand how to use "action_color();"

I tried several ways :

1. action_color(#E9CEA9);
2. action_color(E9CEA9);
3. action_color(233, 206, 169);

but I get an error. ;)

Please help me.

1. The # causes a syntax error.
2. Unknown variable E9CEA9 perhaps? Hexadecimal numbers are noted by a $ sign in GM.
3. Too many arguments.

Try this:
action_color($E9CEA9);
Isn't action_color() the exact same function as draw_set_color()? :P

Edited by Big J, 22 April 2008 - 03:07 AM.

  • 0

#49 Dom83

Dom83

    GMC Member

  • GMC Member
  • 138 posts

Posted 23 April 2008 - 02:30 PM

thanks
  • 0

#50 Hitman0769

Hitman0769

    GMC Member

  • New Member
  • 20 posts

Posted 28 May 2008 - 06:32 PM

Awesome Guide!!!
  • 0

#51 Green_Sky

Green_Sky

    GMC Member

  • New Member
  • 70 posts

Posted 03 June 2008 - 09:17 PM

with create moving you can use with (instance_create(x,y,object1) ) motion_set(direction,speed); because instance_create returns the id of the new object
  • 0

#52 goreforcexgames

goreforcexgames

    GMC Member

  • New Member
  • 594 posts

Posted 08 June 2008 - 03:25 AM

oh this is great, it helps me out a lot! :P
  • 0

#53 bobo7264

bobo7264

    GMC Member

  • New Member
  • 30 posts

Posted 23 June 2008 - 03:50 PM

1)

Hi

I don't understand how to use "action_color();"

I tried several ways :

1. action_color(#E9CEA9);
2. action_color(E9CEA9);
3. action_color(233, 206, 169);

but I get an error. dry.gif

Please help me.


Doesn't gm prefer c_<color> to col,orc,ode or C070UR?

2) What's the GML for relative? I.E if object exists at -32,32 relative.
  • 0

#54 Dangerous_Dave

Dangerous_Dave

    GMC Member

  • Global Moderators
  • 9402 posts
  • Version:Unknown

Posted 24 June 2008 - 01:58 AM

1. I don't know what this guide teaches, but I disaprove of anything starting with action_*. draw_set_color(c_red) will set the drawing colour to red, however I'm not entirely sure what action_color(...) is actually supposed to do.
2. If object exists at x-32, y+32
  • 0

#55 GrayAvocado

GrayAvocado

    A big bad Wolf

  • GMC Member
  • 1226 posts

Posted 25 June 2008 - 12:59 PM

1)

Hi

I don't understand how to use "action_color();"

I tried several ways :

1. action_color(#E9CEA9);
2. action_color(E9CEA9);
3. action_color(233, 206, 169);

but I get an error. dry.gif

Please help me.


Doesn't gm prefer c_<color> to col,orc,ode or C070UR?

2) What's the GML for relative? I.E if object exists at -32,32 relative.

make_color_rgb?


x-32, y+32

Edited by -wolfprograming-, 25 June 2008 - 12:59 PM.

  • 0

#56 Littlefire

Littlefire

    GMC Member

  • New Member
  • 22 posts

Posted 17 July 2008 - 04:55 AM

thank you thank you thank you thank you thank you!!!!!!!!!!!! :huh: :) ::lmao::
  • 0

#57 bobo7264

bobo7264

    GMC Member

  • New Member
  • 30 posts

Posted 21 July 2008 - 06:14 PM

What is not?
For example,

[codebox]if variable =0 NOT{
score += 10000000000000000000000000000000000000000000000000
}[/codebox]

Edited by bobo7264, 21 July 2008 - 06:14 PM.

  • 0

#58 Dangerous_Dave

Dangerous_Dave

    GMC Member

  • Global Moderators
  • 9402 posts
  • Version:Unknown

Posted 22 July 2008 - 05:09 AM

not is the logical negator. It makes true false and false true. So, your example corrected:
if not (variable == 0)
{
  score += 10000000000000000000000000000000000000000000000000
;
}

That code will add 1000000...0000000 to the score if the variable "variable" is not equal to 0.
  • 0

#59 Rexhunter99

Rexhunter99

    GMC Member

  • GMC Member
  • 922 posts

Posted 29 July 2008 - 08:08 AM

not is the logical negator. It makes true false and false true. So, your example corrected:

if not (variable == 0)
{
  score += 10000000000000000000000000000000000000000000000000
;
}

Not true, Not is a name for !, basically, Not checks to see if the variable is equal to the value if it isnt (doesnt matter what it is) then the following code will execute.
  • 0

#60 pokeboy

pokeboy

    GMC Member

  • New Member
  • 1 posts

Posted 29 July 2008 - 12:45 PM

I cant get it to work :D :)
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users