Welcome Guest ( Log In | Register )

[ Big| Medium| Small] -



Post new topic Reply to topic  [ 6 posts ] 
    MarioSuperStar
  Wed May 11, 2011 2:08 am
User avatar
Member

Somone knows how to set a sprite mask to an object via scripting?(not by action eventing.)
Engine: Game Maker 8.0

_________________
Life is something to joy, not to profane.


Last edited by MarioSuperStar on Wed Jun 01, 2011 1:28 am, edited 2 times in total.

Top Top
Profile      
 

    Gubid
  Wed May 11, 2011 5:16 pm
Scripting Nerd
User avatar
Member


Location: Utah, US
In RPG Maker..
The only 'MASK' you can set in base ruby is src_rect (which is part of the sprite class). It however, only allows you to set a viewable rectangle of the source sprite, which is how characters are already drawn. If you want to apply to image mask etc, then you must do it via GDI calls etc. If you are referring to any other sort of mask, can you please explain yourself better?

In Other.. This entirely depends on what engine you are using and what that engine has access to. For example: Express Game Maker has direct access to all MS XNA operations, so creation can be pretty easy. But with things like say Game Makers GML script engine, it does not provide access to outside resources (to my knowledge) and is therefor far more limited. So if there was not a method already available for you to do so, then you would be out of luck.

Best of luck with this!

_________________
Minecraft/Terraria Server Information: SponAsylum.dyndns.org
Daily Map Render available at http://SponAsylum.dyndns.org/map

My Projects

Awards


Top Top
Profile      
 

    MarioSuperStar
  Wed May 11, 2011 10:08 pm
User avatar
Member

oh sorry, didn't noticed i hadn't put the engine it's Game Maker.

_________________
Life is something to joy, not to profane.


Top Top
Profile      
 

    Morphex
  Sun May 15, 2011 12:31 am
Member

mask_id is what you want I think. Not sure if thats the name, but dont have GM installed here so I can't really tell.

_________________
http://www.morphexe.com/Blog/4009/beta-testing-the-engine-online


Top Top
Profile      
 

    TheBlackMarket
  Mon May 16, 2011 5:26 am
Everywhere, doing everything
User avatar
Member

If you're trying to change the collision mask of an object to a sprite resource in GML (we'll call it sprMask) you're looking for mask_index.
That is to say,
mask_index = sprMask;
is what you're looking for.


Top Top
Profile      
 

    MarioSuperStar
  Wed Jun 01, 2011 1:25 am
User avatar
Member

ok thanks.

_________________
Life is something to joy, not to profane.


Top Top
Profile      
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


Who is online

Users browsing this forum: No users and 4 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

We are an independent, not-for-profit game making community.
Homepage
Board Index
About Us
Downloadable Games
Free Browser Games
Games in Development
RPG Maker Support
Game Maker Support
Construct 2 Support
HBGames the eZine
Advanced RPG Maker
Site Announcements
Powered by phpBB © phpBB Group