The Sinister Design Forums

Please login or register.

Login with username, password and session length
Advanced search  

News:

Welcome to the new Sinister Design forums!

Pages: 1 ... 6 7 [8] 9 10 ... 118

Author Topic: Ask the developer a question!  (Read 300283 times)

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3302
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #105 on: May 12, 2010, 07:55:39 PM »

Oh, I don't want to spoil it. ;)

On a less serious (but coincidentally related) note, I don't suppose you would mind giving out any disturbingly vague details or enticingly cryptic clues about the trial scene you recently mentioned being in the game.

For the right price, sir, I will have any legal expertise you want!
Logged

Guye

  • Stone Golem
  • *
  • Offline Offline
  • Posts: 44
    • View Profile
Re: Ask the developer a question!
« Reply #106 on: May 12, 2010, 08:10:03 PM »

I'm flattered by your speedy denouncement of the moral implications of defending an obviously guilty murderer, when in light of a speedy paycheck. Unfortunately my funds may not be quite enough to buy your services at the moment. I may or may not have lost a vast amount of money gambling in Reno. This also may or may not have something to due with the aforementioned murder.

Oh, I don't want to spoil it. ;)

Such a tease.
Logged

algebra15

  • Red Cape
  • **
  • Offline Offline
  • Posts: 129
    • View Profile
Re: Ask the developer a question!
« Reply #107 on: May 14, 2010, 06:48:45 PM »

sorry to interrupt, but if one wants an onEnterFrame behavior on all the instances of one object, how would one phrase the onEnterFrame? More specifically, WHATGOESHERE.onEnterFrame. I tried to use the name of the library item, ("platform") but it only worked on instances named "platform."


P.S. as another question, how do you change the game so people can't just right-click the game and step forward or backward?
Logged
This is Gambit. The cards are about to explode. Goodbye!

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3302
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #108 on: May 14, 2010, 09:10:12 PM »

You have to give every movieclip a unique instance name regardless. So whatever code you're using to generate the movieclip instances, simply include an onEnterFrame function. For example (using AS2):

Code: [Select]
newInstanceNumber = 0;

function generateInstance () {

newInstanceNumber++;
var newInstanceDepth:Number = 50 + newInstanceNumber;
var newInstanceName:String = "movieClipName" + newInstanceNumber;

var newInstance:MovieClip = attachMovie("movieClipName" , newInstanceName , newInstanceDepth);

newInstance.onEnterFrame = function () {
//here goes whatever you want each movieclip to do on every frame
}

}

//this should run generateInstance 20 times, thus creating movieClipName1 through movieClipName20
for (i = 1; i < 21; i++) {
generateInstance();
}

P.S. as another question, how do you change the game so people can't just right-click the game and step forward or backward?

I believe you'd want something like this, provided you're working in AS2 or lower:

Code: [Select]
var myMenu:ContextMenu = new ContextMenu();
myMenu.hideBuiltInItems();
_root.menu = myMenu;

AS3 works pretty much the same way.

I hope that helps!
Logged

Duskling

  • Black Cape
  • ***
  • Offline Offline
  • Posts: 846
    • View Profile
Re: Ask the developer a question!
« Reply #109 on: May 14, 2010, 09:16:30 PM »

With all due respect, Creator, you don't participate in the games very much, why? ???
Logged

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3302
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #110 on: May 14, 2010, 09:18:43 PM »

The forum games, you mean? Well, it's mostly because I try to spend my free time working on TSoG, answering questions, and marketing the game. I only have so many hours in a day, you know. ;)

Right now, for instance, I'm working out some bugs I caught when I was playtesting earlier today. Every moment I spend thinking of clever ways to corrupt a wish is a moment I'm not spending making TSoG better.
Logged

Duskling

  • Black Cape
  • ***
  • Offline Offline
  • Posts: 846
    • View Profile
Re: Ask the developer a question!
« Reply #111 on: May 14, 2010, 09:20:29 PM »

Fair enough, but don't you have some magic free hour when you are too tired to work on TSoG, but not so to as to participate in a forum game?
Logged

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3302
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #112 on: May 14, 2010, 09:21:47 PM »

Occasionally--but that's what my girlfriend is for! :D
Logged

Duskling

  • Black Cape
  • ***
  • Offline Offline
  • Posts: 846
    • View Profile
Re: Ask the developer a question!
« Reply #113 on: May 14, 2010, 09:22:55 PM »

Who is your girlfriend?
Logged

Zhampir

  • Black Cape
  • ***
  • Offline Offline
  • Posts: 635
    • View Profile
    • My Facebook
Re: Ask the developer a question!
« Reply #114 on: May 14, 2010, 11:32:00 PM »

Wow, Duskling, aren't we getting personal?
It's his PCG (Personal Computerized Girlfriend)!^^
How many hours (on average) per day/week/weekend/etc do you spend on TSoG?
Logged

algebra15

  • Red Cape
  • **
  • Offline Offline
  • Posts: 129
    • View Profile
Re: Ask the developer a question!
« Reply #115 on: May 15, 2010, 06:16:57 AM »

Before this conversation gets too far astray (and it may have already), thanks a million.
Logged
This is Gambit. The cards are about to explode. Goodbye!

CraigStern

  • The Creator
  • Administrator
  • General
  • *****
  • Offline Offline
  • Posts: 3302
    • View Profile
    • Sinister Design
Re: Ask the developer a question!
« Reply #116 on: May 15, 2010, 07:04:57 AM »

No problem. :)

How many hours (on average) per day/week/weekend/etc do you spend on TSoG?

Honestly? I'm not sure. I typically work on TSoG for a couple of hours before I leave for work. I oftentimes write dialog or think up ideas while I'm riding the train to or from work. Then I usually spend between one hour and six hours working on it after I get home, depending on the circumstances.
Logged

Xemadus Echina

  • Blue Cape
  • **
  • Offline Offline
  • Posts: 235
  • :D ;D :) :( :-X :-[ :'(
    • View Profile
Re: Ask the developer a question!
« Reply #117 on: May 15, 2010, 09:39:43 AM »

you ride a train to work? a real train  or a subway? or a trolly?

is KZ ever gonna come back?

will the telepath testing crew ever have a real home? (not just the thread i started it in)
Logged
im writing a book!
http://sinisterdesign.net/forum/index.php?topic=236.0;topicseen
heres a free verse poem I wrote for school
You never know
Just what you will find after you
Lost your favorite thing. But
The important thing is that the
Game you play will help you to get by.

algebra15

  • Red Cape
  • **
  • Offline Offline
  • Posts: 129
    • View Profile
Re: Ask the developer a question!
« Reply #118 on: May 15, 2010, 10:52:05 AM »

I was making some code for the game I asked you about before, and I opted to make it a bit differently. The code makes 5 platforms once. Problem is, "thyPlatform"'s properties and methods seem to go away when the variable is assigned to a different platform; this means only one works, and causes the jumper to bounce. I also have some code for the class "Platform", but the hitTest seems not to work as simply as it does in the frame code.
Code: [Select]
_root.makePlatform = function(){
if (_root.make != true){
for (x = 0; x < 5; x += 1){
newPlatformNumber += 1;
_root.attachMovie("platform", "platform" + newPlatformNumber, 50+newPlatformNumber);
thyPlatform = eval("platform" + newPlatformNumber);
thyPlatform.onEnterFrame = function(){
thyPlatform.checkJumper();
}

thyPlatform.checkJumper = function(){
if (thyPlatform.hitTest(jumper._x, jumper._y, true) && (jumper.dy > 0)){
_root.boing = true;
trace(_root.boing);
}
}
_root.make = true;
}
}
}
Class:
Code: [Select]
class Platform extends MovieClip {
function Platform(){
_x = Math.random()*Stage.width;
_y = 400;
}
function checkJumper(){
if (
}
}
Logged
This is Gambit. The cards are about to explode. Goodbye!

algebra15

  • Red Cape
  • **
  • Offline Offline
  • Posts: 129
    • View Profile
Re: Ask the developer a question!
« Reply #119 on: May 15, 2010, 10:53:20 AM »

sorry for double post, but I forgot to add the question. Is there a better way to do this with the structure I've got, or to I have to rip it out and start again with coding for the class?
Logged
This is Gambit. The cards are about to explode. Goodbye!
Pages: 1 ... 6 7 [8] 9 10 ... 118