Go to page Previous  1 ... 33, 34, 35, 36, 37, 38, 39 ... 41  Next  [ 816 posts ]  Reply to topicPost new topic 
Coding Help, Questions and Issues relating to coding
Author Message
 [zz]
 Post subject: Re: Coding Help
PostPosted: Mon Nov 02, 2015 5:33 pm 
User avatar
Member
[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
Try using this code in the Step event of a certain object:

Code:
instance_deactivate_object ( obj_goomba );
instance_activate_region ( view_xview[0], view_yview[0], view_wview[0], view_hview[0], true );


The code above will deactivate "obj_goomba", and will only reactivate them if they are present on View 0's screen.

_________________
Image
 
Top
Offline 
 User page at mfgg.net
 
 [zz]
 Post subject: Re: Coding Help
PostPosted: Fri Nov 06, 2015 6:32 pm 
User avatar
Member
[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
Sorry for the double post, but...

Syaxamaphone wrote:
I've actually got a thing for this.

Spoiler:


just throw it in a script and when you call it, use the keycode as the argument and it'll spit out the key name for you. Should do fine.


I tried that, and it worked really nicely. Though, GameMaker: Studio seems to refuse to show some of the keys in-game, like Shift for example, and I'm not sure why is this happening.

EDIT: Never mind, I found the cause of it and fixed it.

_________________
Image
 
Top
Offline 
 User page at mfgg.net
 
 [zz]
 Post subject: Re: Coding Help
PostPosted: Sat Nov 07, 2015 6:22 pm 
User avatar
Member
[*]
I never thanked u for the code q nova so thank you. And it worked great. Just one thing i over looked.
Would you know how I can make it only work one time? So that after an enemy is introduced to screen, it will be active once offscreen again?

 
Top
Offline 
 
 
 [zz]
 Post subject: Re: Coding Help
PostPosted: Sun Nov 08, 2015 10:42 am 
User avatar
Member
[*]
making a new post to show there has been progress with this. i tried making a variable called "enemyActive" and set it to false. and around the code you provided, i put "if enemyActive" and above it, in a seperate statement, i put
Code:
if view_xview > 0 && view_yview > 0
    {
    enemyActive = true;
    }

didn't work, but am i on the right track with this?

 
Top
Offline 
 
 
 [zz]
 Post subject: Re: Coding Help
PostPosted: Thu Dec 17, 2015 3:13 am 
User avatar
Member
Hi I'm sort of new to these forums. (Though I am not new to MFGG in general) I just had a simple question(s)
Has anyone implemented a Mario themed game in RPG Maker? By that I mean using features such as jumping, running, hitting blocks from over the player? If so I'd love to look at it! :D I'm trying to implement something like this in RPG Maker VX.

 
Top
Offline 
 
 
 [tr]
 Post subject: Re: Coding Help
PostPosted: Thu Dec 17, 2015 7:39 am 
User avatar
Thanks DonnieTheGuy!
Administrator
[A]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
I don't know anything about RPG Maker but do not make a sidescroller platformer with it.
Is that what you're trying to make?

_________________
Image
 
Top
Offline 
 
 
 [us]
 Post subject: Re: Coding Help
PostPosted: Thu Dec 17, 2015 9:41 am 
User avatar
Plz no inflation porn
Member
[*]
[*]
[*]
Judging by what he's said, I don't think he wants to make a platformer. He just wants to add jumping, running and hittable question blocks to an RPG game.

_________________
The above post is probably the most intelligent thing you're going to see all day.
Image
Image
 
Top
Offline 
 
 
 [zz]
 Post subject: Re: Coding Help
PostPosted: Thu Dec 17, 2015 3:09 pm 
User avatar
Member
BlimpFruit wrote:
Judging by what he's said, I don't think he wants to make a platformer. He just wants to add jumping, running and hittable question blocks to an RPG game.


That's exactly what I was talking about! :agree: :)

 
Top
Offline 
 
 
 [zz]
 Post subject: Re: Coding Help
PostPosted: Wed Dec 23, 2015 4:54 pm 
User avatar
I, Papyrus, am awesome!
Member
[*]
[*]
[*]
As far as I remember, RPG Maker is super limited and wouldn't allow you to do the most simple things.
Hence why I have quit RPG Maker.
However, there is someone who managed to created a "platformer-RPG" on RPG Maker that is actually halfway decent, at least.
I don't remember the name anymore, but it's basically MegaMan X and Zero fighting off against past Mavericks and the occasional Robot Master (it's clearly stated that they are resurrected by an unknown force and were supossed to be dead), and while the first installment was horrible, the second one is pretty nice, and the upcoming third installment is trying to break some of RPG Maker's limits, so you really should take a look at that.
Be warned, though: It's as hard as an official MegaMan game.

_________________
My games:
Spoiler:

What I also support:
Spoiler:
 
Top
Offline 
 User page at mfgg.net
 
 [es]
 Post subject: Re: Coding Help
PostPosted: Fri Dec 25, 2015 7:07 pm 
User avatar
I'm just a little adorable kitty :3
Member
[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

K, I came up with something for APJ but I don't know how to handle it.

You know that the point fx on Super Mario Bros stays on the same x it appears, is there a way in GM to make that thing?

_________________
Image ImageImageImageImageImageImage Image
~ Supernova / Drawerkirby (2) / Gato / Neweegee (2) (3) ~
"shy guys are wall plugs confirmed" - Vitiman on Club Saturn Ex
Image
 
Top
Offline 
 User page at mfgg.net
 
 [us]
 Post subject: Re: Coding Help
PostPosted: Fri Dec 25, 2015 11:10 pm 
User avatar
Kootie Patootie
Member
[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
[*]
Gatete wrote:
K, I came up with something for APJ but I don't know how to handle it.

You know that the point fx on Super Mario Bros stays on the same x it appears, is there a way in GM to make that thing?

Can't you just create an object which draws a score, and floats upward?

_________________
Image
My mains
 
Top
Offline 
 User page at mfgg.net
 
 [us]
 Post subject: Re: Coding Help
PostPosted: Sat Dec 26, 2015 1:57 am 
User avatar
* Incredible nightmare ensues *
Member
[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
From what I've learned, it seems you'll need to make a score object that always exist, stays locked at the view's top-left corner and takes a given position(the one the score text is "created" at) and use the distance from it to basically convert it's room x/y position to a in-view x/y position.

It's a pretty hard to simply explain(and I suck at explaining things, too) so I've made an .GMZ for Game Maker Studio to directly show how I'd do it(I hope that's okay in this topic, if not I'll take it down ASAP).

https://www.mediafire.com/?g3eph16r91tfgmg

All you really need to look at is the "obj_score" object and "scr_scoreget" script.

It probably can be done in a better way, but this seems to work very well, and I think that's what really matters.
I hope this helps.

_________________
Image
 
Top
Offline 
 User page at mfgg.net
 
 [es]
 Post subject: Re: Coding Help
PostPosted: Sat Dec 26, 2015 3:29 am 
User avatar
I'm just a little adorable kitty :3
Member
[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

Neweegee wrote:
From what I've learned, it seems you'll need to make a score object that always exist, stays locked at the view's top-left corner and takes a given position(the one the score text is "created" at) and use the distance from it to basically convert it's room x/y position to a in-view x/y position.

It's a pretty hard to simply explain(and I suck at explaining things, too) so I've made an .GMZ for Game Maker Studio to directly show how I'd do it(I hope that's okay in this topic, if not I'll take it down ASAP).

https://www.mediafire.com/?g3eph16r91tfgmg

All you really need to look at is the "obj_score" object and "scr_scoreget" script.

It probably can be done in a better way, but this seems to work very well, and I think that's what really matters.
I hope this helps.


It worked, thank you :)

_________________
Image ImageImageImageImageImageImage Image
~ Supernova / Drawerkirby (2) / Gato / Neweegee (2) (3) ~
"shy guys are wall plugs confirmed" - Vitiman on Club Saturn Ex
Image
 
Top
Offline 
 User page at mfgg.net
 
 [se]
 Post subject: Re: Coding Help
PostPosted: Sun Dec 27, 2015 3:31 pm 
User avatar
secret technology
Member
[*]
[*]
[*]
[*]
Does anyone know a workaround when it comes to disabling HingeJoint components in Unity? It's super strange that they removed that function, as you can do it with 2D hinge joints - It seems that they even removed rigidBody.enabled. I solved that with ".Sleep", but still, why is hingeJoint.enabled not a thing!?

Code:
      if (!ragdoll) {
         rigidBody.Sleep ();
         for (int i = 0; i < ragdollParts.Length; i++) {

            ragdollJoints [i].enabled = false;

         }
      }

That is what the code is supposed to do, but sadly, it only works with 2D joints! :(

EDIT: Turns out I didn't have to disable them, as the rigidbody was disabled it basically cancelled the hinge joint.
EDIT2: Nevermind, hinge joints still have to be disabled!

 
Top
Offline 
 User page at mfgg.net
 
 [us]
 Post subject: Re: Coding Help
PostPosted: Sun Dec 27, 2015 4:09 pm 
User avatar
C# Programmer
Member
[*]
[*]
[*]
[*]
For ragdolls, don't people usually separate the player object and ragdoll? Then, when the ragdoll is needed, the player gets deactivated and the ragdoll gets activated in the player's place.

_________________
MFGG TKO (scrapped) - Animations
Image
"It feels that time is better spent on original creations" - Konjak
Focus on the performance, the idea, not the technical bits or details - Milt Kahl
 
Top
Offline 
 
 
 [ca]
 Post subject: Re: Coding Help
PostPosted: Sun Dec 27, 2015 4:17 pm 
User avatar
sluuuuurp
Member
[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

[*]
[*]
[*]
[*]
[*]

is there a way to make GM be able to handle super large number values? like planetary masses, that sort of thing

_________________
DO NOT under estimate this lakitu to much or it will be the end of that life (note: do not over estimate him either).
Image
Spoiler:
 
Top
Offline 
 User page at mfgg.net
 
 [se]
 Post subject: Re: Coding Help
PostPosted: Sun Dec 27, 2015 6:26 pm 
User avatar
secret technology
Member
[*]
[*]
[*]
[*]
TheShyGuy wrote:
For ragdolls, don't people usually separate the player object and ragdoll? Then, when the ragdoll is needed, the player gets deactivated and the ragdoll gets activated in the player's place.

I did manage to fix it after a while of experimenting, but doing it this way ment that the player kept his position when going ragdoll-mode, so for example aiming a gun made a smooth transition to falling over.

 
Top
Offline 
 User page at mfgg.net
 
 [aq]
 Post subject: Re: Coding Help
PostPosted: Fri Jan 01, 2016 10:27 pm 
User avatar
Obey.
Member
[*]
[*]
is there a way to make GM be able to handle super large number values? like planetary masses, that sort of thing


I don't think so. Game Maker only supports 32-bit floating point numbers. http://docs.yoyogames.com/source/dadios ... types.html

What are you trying to accomplish with this? Is this is huge open universe game?

_________________
I am your supreme leader
 
Top
Offline 
 User page at mfgg.net
 
 [us]
 Post subject: Re: Coding Help
PostPosted: Sat Jan 02, 2016 2:03 am 
User avatar
C# Programmer
Member
[*]
[*]
[*]
[*]
If you're trying to represent large planets where you can also traverse along it's ground, you really wouldn't want to use floating point numbers anyways. From what I remember, the issue is related to how precise floating point numbers are near zero compared to numbers far from zero. For example,with sufficiently large numbers, you can't apply small increments.

_________________
MFGG TKO (scrapped) - Animations
Image
"It feels that time is better spent on original creations" - Konjak
Focus on the performance, the idea, not the technical bits or details - Milt Kahl
 
Top
Offline 
 
 
 [us]
 Post subject: Re: Coding Help
PostPosted: Sat Jan 02, 2016 7:28 am 
User avatar
もう帰らない
Member
[*]
[*]
[*]
[*]
Of course, if you're literally only talking about having a number indicating mass, you could always use larger units, like Earth mass.

_________________
https://onpon4.github.io
 
Top
Offline 
 
 
« Previous topic | Next topic »
Display posts from previous:  Sort by  
Go to page Previous  1 ... 33, 34, 35, 36, 37, 38, 39 ... 41  Next  [ 816 posts ]  Reply to topicPost new topic 


Who is online

Users browsing this topic: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group