ShadowMarble Beginner Marbler
 member is offline
![[avatar] [avatar]](http://shadowmarble.site50.net/glitch.png)
The shadow is glitching out.
![[msn] [msn]](http://images.proboards.com/new/msn.png)
Joined: Jun 2010 Gender: Male  Posts: 25
|  | Re: Coding questions, or answers rather « Reply #30 on Jul 29, 2010, 2:09am » | |
For deleting objects called %obj:
Code:%obj.getGroup().remove(%obj); %obj.delete(); |
|
If you know the object is in MissionGroup (because you added it there):
Code:MissionGroup.remove(%obj); %obj.delete(); |
|
I can post some code for finding interiors you've created (by searching MissionGroup), if you don't want to use variables to keep track of them.
It's probable that if this code is called from a method of the object (for example, if you're removing a trigger in its onTrigger method), the code will not work properly. There's a fairly simple fix for this, which I can post.
|
110% of coding is hyperbole. |
|
narvoxx Experienced Marbler
  member is offline
![[avatar] [avatar]](http://static.wowhead.com/uploads/screenshots/normal/81121.jpg)
not short enough for one line
Joined: Jul 2010 Gender: Male  Posts: 135
|  | Re: Coding questions, or answers rather « Reply #31 on Jul 29, 2010, 3:35am » | |
Ah thanks! this may prove for another fun level
|
|
|
Seizure22 Advanced Marbler
   [ss:Default Skin] member is offline
![[msn] [msn]](http://images.proboards.com/new/msn.png)
Joined: Jun 2009 Gender: Male  Posts: 250
|  | Re: Coding questions, or answers rather « Reply #32 on Jul 29, 2010, 10:17am » | |
loading interiors in the middle of the game would probably cause a bit of lag.
instead, load them all, keep the interiors you aren't using out of visible range, set them to move to visible range when necessary
| |
|
narvoxx Experienced Marbler
  member is offline
![[avatar] [avatar]](http://static.wowhead.com/uploads/screenshots/normal/81121.jpg)
not short enough for one line
Joined: Jul 2010 Gender: Male  Posts: 135
|  | Re: Coding questions, or answers rather « Reply #33 on Aug 30, 2010, 11:27am » | |
Damn, I don't fully understand how marble blast works, but I do some, now I know that the game can remove any powerups the player has, form what I found this is:
Code:| %this.player.setPowerUp(%this.checkPoint.powerUp,true); |
|
Since this is called by GameConnection (from what I know, atleast) %this = GameConnection, I've also found that GameConnection is the same as %user.client But I need to abled to call setPowerUp without any of those variable, I need to know their full name, eg I need to be abled to $Game.client.player.setPowerUp(...) or something like that. Anyone help me out?
|
|
|
Seizure22 Advanced Marbler
   [ss:Default Skin] member is offline
![[msn] [msn]](http://images.proboards.com/new/msn.png)
Joined: Jun 2009 Gender: Male  Posts: 250
|  | Re: Coding questions « Reply #34 on Aug 30, 2010, 12:02pm » | |
localclientconnection.player.setpowerup();
gameconnections represent the clients connected to the server
since MP is horrible with MBG, you'll probably only be using localclientconnection, which is "your" gameconnection
response to below: you learn things as you go, and this is one of them
| |
|
narvoxx Experienced Marbler
  member is offline
![[avatar] [avatar]](http://static.wowhead.com/uploads/screenshots/normal/81121.jpg)
not short enough for one line
Joined: Jul 2010 Gender: Male  Posts: 135
|  | Re: Coding questions « Reply #35 on Aug 30, 2010, 12:07pm » | |
awesome thanks! where did you find that btw?
|
|
|