Save-Point
f0tz!baerchen Pixel Movement - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: f0tz!baerchen Pixel Movement (/thread-1766.html)

Pages: 1 2


f0tz!baerchen Pixel Movement - MusicalSwordsman - 10-30-2009

Hello guys, i'm looking to modify this script a little.. or maybe a lot.
I don't know much about scripting so i don't know how hard or time consuming anything can be.

Okay let me get to it, what i need is to totally remove the minimap and caterpillar system.
I don't even know what to call this, but right now my characters (the small tyke character sets) get way to close to each other, is there something i can alter to fix this up? I'd really appreciate some help with this.

Almost forgot, i'd also like to remove the diagonal movement as well, if possible just comment this out just in case.

The link to the script.
http://elamshin.rpg-studio.de/wb/media/download_gallery/Pixelmovement1.5.txt


[Resolved] f0tz!baerchen Pixel Movement - PK8 - 10-30-2009

Looks like a support thread. *moves*


[Resolved] f0tz!baerchen Pixel Movement - DerVVulfman - 10-31-2009

Okay. It's a configurable switch in the 'Initialize' method. I found it at first glance...

Code:
@cater_activate = true
    @cater_overlap = true
    @sprint_speed = 1
Change @cater_activate to 'false'

and...

Code:
@minimap_c_pass = Color.new (255, 255, 255)
    @minimap_c_n_pass = Color.new(0, 0, 0)
    @minimap = true
    @minimap_sprites = true
    @minimap_collision = false
Change @minimap to 'false'

That should allow you to turn off both the caterpillar and minimap systems.

MIND you... you mentioned that you had 'tyke' sprites getting too close, right?

Code:
@cater_distance = 8
    @cater_activate = true
    @cater_overlap = true
You can change @cater_overlap to 'false' so they don't overlap each other, and maybe mess with @cater_distance to space them out more.


[Resolved] f0tz!baerchen Pixel Movement - MusicalSwordsman - 10-31-2009

Yes! You are the man. Even if it was simple i really appreciate your help, i'll make the changes and report back.


[Resolved] f0tz!baerchen Pixel Movement - MusicalSwordsman - 11-01-2009

Nop! Nothing man, mini map was still there as well as the caterpillar.
I just began commenting out some things to see where they would take me.
I found the

#-----------------------------------------------------------------------------
# switch for the minimap
#-----------------------------------------------------------------------------
# def switch_minimap(value = nil)
# @minimap = value == nil ? !@minimap : value
#end


And commented that out which took me somewhere else and i did the same there, then it was gone.
I will test it out and hopefully it wont give me a problem.

Did something similar to a piece of caterpillar code and the characterdoesn't dissapear behing me anymore when i stop..
I will try to fiddle around with it some more and see what happens.


[Resolved] f0tz!baerchen Pixel Movement - DerVVulfman - 11-01-2009

Okay... I noticed he typed that the instructions/settings are at the END of the script. At the end? I always put them at the beginning. :CHEERY:

For the Caterpillar section...
Code:
# Distance in Px:
$pixelmovement.cater_distance = 8

# Switch for the Caterpillar Script:
$pixelmovement.switch_caterpillar(true)

# Switch for Caterpillar Overlapping:
$pixelmovement.switch_cater_overlap(true)
So, use a script call and enter...
Code:
$pixelmovement.switch_caterpillar(false)
... to turn it off.

Oh, and there are instructions like it for the minimap.
Just use a script call and enter...
Code:
$pixelmovement.switch_minimap(false)
... to turn the MAP off. ^_^


[Resolved] f0tz!baerchen Pixel Movement - MusicalSwordsman - 11-02-2009

Thanks man, i will make the changes right now.

666 the mark of the beast!


[Resolved] f0tz!baerchen Pixel Movement - MusicalSwordsman - 11-02-2009

OKay, forgive me but i'm going to bother the hell out of you now ^^

About the script call, i enter the map code and bang it's gone, but i enter the caterpillar code and nothing happens there, i entered it in the same event as the map code, event set to parallel process.
I also tried to add both codes in the same script call but i get an error that reads "Syntax error occurred while running the script", what am i doing wrong here?

E-
I used a fresh script before doing the changes.
E!!
I changed it to false for that caterpillar code you showed, sorry about that, thanks a lot bro.

One last thing, how would i go about changing the sprite distance from each other?
I will definetly add your nick as well when i put this up on the Tyke template thread.


[Resolved] f0tz!baerchen Pixel Movement - DerVVulfman - 11-02-2009

Code:
# Distance in Px:
$pixelmovement.cater_distance = 8

All the settings are at the bottom of the script.

Oh, you can change them THERE, so no script call is needed. Just change them at the bottom.

Funny place to put a configuration section. :cheery:


[Resolved] f0tz!baerchen Pixel Movement - Queue - 11-02-2009

It's cause f0tz thought he was the bees knees with programming. I mean, it's a wonderful script but really really badly constructed.