|
Post by daisy_strike on Sept 22, 2010 6:10:29 GMT -5
I cant run a debug without the .swf but what pops out is
if ( GameArray[whatGirl].girlItems[4] != null) {//swimsuit if (pic == 100 && (GameArray[whatGirl].girlItems[4].toString() == itemCompareArray[10][0].toString())) { characterScreenFormat(mari.mariBikini1); return; } else if (pic == 100 && (GameArray[whatGirl].girlItems[4].toString() == itemCompareArray[7][0].toString())) { characterScreenFormat(mari.mariMaid);//maid return; } } }
see the extra parethesis? Should just be two here.
if that isn't it go check where the errors start what line.
I'm done for the night going to sleep.
Daisy
|
|
|
Post by redcape on Sept 23, 2010 23:47:05 GMT -5
Can you write an event based on how high/low happiness or is she in love you? for example i would like make the slave have different type of conversation when you spend time to converse to her based on how happy/in love she is?
|
|
|
Post by daisy_strike on Sept 24, 2010 5:55:04 GMT -5
Yes most definitly.
good old menace code:
if (eventNum == 2010) { jobClean(eventNum); slideShowFormatInternal(talkBackground); storyHopper.push("<B>" + peopleName(10) + "</b><br>Hmmph... do you think you can control me?"); mainTextStart(12000, 0, 110); return true; }
if you want happiness:
if (eventNum == 2010 && GameArray[whatGirl].girlHappinessTotal > 75) { jobClean(eventNum); slideShowFormatInternal(talkBackground); storyHopper.push("<B>" + peopleName(10) + "</b><br>Isn't the weather today wonderful?"); mainTextStart(12000, 0, 110); return true; }
NOTE THIS ONE MUST OCCUR BEFORE THE OTHER ONE IF YOU HAVE BOTH... do to checks, so happiness will check first then unhappy.
love example:
if (eventNum == 2010 && checkForEffect(1, whatGirl) ) { jobClean(eventNum); slideShowFormatInternal(talkBackground); storyHopper.push("<B>" + peopleName(10) + "</b><br>Master I love you!"); mainTextStart(12000, 0, 110); return true; }
all together if you wanted to do all 3 would look like...
function MenaceEvents(eventNum:int):Boolean{ //love checks first if (eventNum == 2010 && checkForEffect(1, whatGirl) ) { jobClean(eventNum); slideShowFormatInternal(talkBackground); storyHopper.push("<B>" + peopleName(10) + "</b><br>Master I love you!"); mainTextStart(12000, 0, 110); return true; } //second happy else if (eventNum == 2010 && GameArray[whatGirl].girlHappinessTotal > 75) { jobClean(eventNum); slideShowFormatInternal(talkBackground); storyHopper.push("<B>" + peopleName(10) + "</b><br>Isn't the weather today wonderful?"); mainTextStart(12000, 0, 110); return true; } //last unhappy else (eventNum == 2010) { jobClean(eventNum); slideShowFormatInternal(talkBackground); storyHopper.push("<B>" + peopleName(10) + "</b><br>Hmmph... do you think you can control me?"); mainTextStart(12000, 0, 110); return true; } return false; }
These should work but I didn't test them.
Daisy
|
|
|
Post by redcape on Sept 24, 2010 10:02:35 GMT -5
allright, thanks a lot..
another question, can you use "temp" command on them to add more dialogue?
|
|
|
Post by daisy_strike on Sept 24, 2010 16:05:48 GMT -5
ugh temp isn't a command its just a user created variable. to add more dialog in a row just use multiple storyHopper.push("<B>" + peopleName(10) + "</b><br>Hmmph... do you think you can control me?"); storyHopper.push("<B>" + peopleName(10) + "</b><br>line 2 in a row."); mainTextStart(12000, 0, 110);
or did you mean randomly chose a line of text and if so yes...
temp = int(Math.random()*3) + 1; if (temp == 1) { storyHopper.push("<B>" + peopleName(10) + "</b><br>Good Morning."); } else if (temp == 2) { storyHopper.push("<B>" + peopleName(10) + "</b><br>How are you today?"); } else { storyHopper.push("<B>" + peopleName(10) + "</b><br>something line 3"); } mainTextStart(12000, 0, 110);
This will display one of the 3 lines each time.
|
|
|
Post by redcape on Sept 24, 2010 20:50:03 GMT -5
yes, that's what i mean, using temp to randomly chose line of text ;D
next question: can you change the girl pic in character screen according what item she wears? ex: i want to change my girl pic when i equipped her with new clothes
thanks in advance!
|
|
|
Post by daisy_strike on Sept 24, 2010 21:01:07 GMT -5
yes most definilty thats what this part of the display function does :
if (GameArray.length != 0) { if (worksafe != true && GameArray[whatGirl].girlItems[4] == null && pic == 100) {//character screen characterScreenFormat(princess.princess1Nude); return; } if ( GameArray[whatGirl].girlItems[4] != null) { if (pic == 100 && (GameArray[whatGirl].girlItems[4].toString() == itemCompareArray[10][0].toString())) { characterScreenFormat(princess.princess1FrontSwimsuit); return; } else if (pic == 100 && (GameArray[whatGirl].girlItems[4].toString() == itemCompareArray[7][0].toString())) { characterScreenFormat(princess.princess1FrontMaid); return; } } if (pic == 100) { //character screen characterScreenFormat(princess.princess1FrontImage); return; } }
so if you want to display other things...
checkItemWorn(item:int, girl:int)
function does. (Going to change the example girls to use it sooner or later)
if (pic == 100 && checkItemWorn(22, whatGIrl) && checkItemWorn(8, whatGIrl)) { jobScreenFormat(princess.princess1FrontMaidWithTail);//maid with horo tail return; }
for a list of item numbers go see item.as
var CompareitemDressChainMailBikini:Array = new Array(result, 9, "Chainmail Bikini", "Chainmail bikini top, but does it afford any real protection?", 5, 0, 0, 0, 0, false, 80, 0, 5, 15, 15, 15, -2, -15, 0, 0, null, 0, false);
The first number (in this example 9) is the item number.
Daisy
|
|
|
Post by redcape on Sept 24, 2010 21:09:39 GMT -5
so i just add this:
checkItemWorn(item:int, girl:int)
below the "}" in the last line of that display function?
is it also applicable for this line (character screen display):
if (GameArray.length != 0) { if (worksafe != true && GameArray[whatGirl].girlItems[4] == null && pic == 100) {//character screen temp = int(Math.random()*3) + 1; if (temp == 1) {//just reuse the naked pics from the auction screen characterScreenFormat(mari.mariNude1); } else if (temp == 2) { characterScreenFormat(mari.mariNude2); } else { characterScreenFormat(mari.mariNude3); } return; } if ( GameArray[whatGirl].girlItems[4] != null) {//swimsuit if (pic == 100 && (GameArray[whatGirl].girlItems[4].toString() == itemCompareArray[10][0].toString())) { characterScreenFormat(mari.mariBikini1); return; } else if (pic == 100 && (GameArray[whatGirl].girlItems[4].toString() == itemCompareArray[7][0].toString())) { characterScreenFormat(mari.mariMaid);//maid return; } } if (pic == 100) { //character screen default image characterScreenFormat(mari.mariDefault); return; } }
|
|
|
Post by daisy_strike on Sept 24, 2010 21:20:37 GMT -5
if (GameArray.length != 0) { if (worksafe != true && GameArray[whatGirl].girlItems[4] == null && pic == 100) {//character screen characterScreenFormat(princess.princess1Nude); return; } if ( GameArray[whatGirl].girlItems[4] != null) { if (pic == 100 && (GameArray[whatGirl].girlItems[4].toString() == itemCompareArray[10][0].toString())) { characterScreenFormat(princess.princess1FrontSwimsuit); return; } else if (pic == 100 && checkItemWorn(22, whatGIrl) && checkItemWorn(8, whatGIrl)) { jobScreenFormat(princess.princess1FrontMaidWithTail);//maid with horo tail return; } else if (pic == 100 && (GameArray[whatGirl].girlItems[4].toString() == itemCompareArray[7][0].toString())) { characterScreenFormat(princess.princess1FrontMaid); return; } } if (pic == 100) { //character screen characterScreenFormat(princess.princess1FrontImage); return; } }
Fixed the previous example there was a mistake.
so example including the maid with tail function... note that it happens before the normal maid picture, so maidwithtail->maid.
Daisy
|
|
|
Post by tf on Sept 25, 2010 1:07:04 GMT -5
Just a heads up, the following post was deleted. (Because of the message received from ProBoards about offensive content. Do not worry that you've done something to offend the members here.) Here's the content of the message minus the picture that had to be removed. (Originally Reply #30) Little late, but here we go. Minis fixed, images re-sized. Not all the images I found are in this version. I may or may not add them in the final version, but I'm having issues finding decent futa pics, so I may just leave all those blank. Ok, two questions. One, I changed the as file, and still can't get it to show up in the game. No idea why. www.mediafire.com/?6szgskfvi3ukw19Two, the attached image won't load into flash for some reason. It recognizes that the file is there and the layer is set to visible, but the screen just stays white when I drag it into flash. Any clues?
|
|
|
Post by redcape on Sept 25, 2010 9:44:54 GMT -5
trying to add this line: function RankaEvents(eventNum:int):Boolean{ //love checks first if (eventNum == 2010 && checkForEffect(1, whatGirl) ) { jobClean(eventNum); slideShowFormatInternal(talkBackground); storyHopper.push("<B>" + peopleName(10) + "</b><br>Master I love you!"); mainTextStart(12000, 0, 110); return true; } //second happy else if (eventNum == 2010 && GameArray[whatGirl].girlHappinessTotal > 0 ) { temp = int(Math.random()*3) + 1; if (temp == 1) { storyHopper.push("<B>" + peopleName(10) + "</b><br>I hope you are not serious to make me your slave."); } else if (temp == 2) { storyHopper.push("<B>" + peopleName(10) + "</b><br>I miss my home... i wish i could back to where i was.."); storyHopper.push("<B>" + peopleName(10) + "</b><br>*sigh* if only i'm not careless as to fall into that pit."); } else { storyHopper.push("<B>" + peopleName(10) + "</b><br>The least you could is not making me naked, Master... it's cold"); } mainTextStart(12000, 0, 110); return true; } //last unhappy else (eventNum == 2010); { jobClean(eventNum); slideShowFormatInternal(talkBackground); storyHopper.push("<B>" + peopleName(10) + "</b><br>Hmmph... do you think you can control me?"); mainTextStart(12000, 0, 110); return true; } return false; but getting this error: also, does text wrap automatically? if not how to determine if the text already overlap the message box? thanks.
|
|
|
Post by daisy_strike on Sept 25, 2010 15:31:56 GMT -5
hmm looks like temp isn't defined. just put this in as the first line of code. var temp:int = new int(0); if you have an hour watch the first 4 or 5 eps of tv.adobe.com/show/actionscript-11-with-doug-winnie/Will teach you the basics of flash programming in easy to understand. Daisy
|
|
|
Post by redcape on Sept 25, 2010 21:33:12 GMT -5
wow thanks for the link! ..just curious, how long do i have to learn flash from the basic until i can make my own game like you ;D
anyway, another question if you don't mind:
in this line, else if (eventNum == 2010 && GameArray[whatGirl].girlHappinessTotal > 0 )
how do you define happiness is between 0 and 15?
|
|
|
Post by daisy_strike on Sept 25, 2010 23:06:30 GMT -5
else if (eventNum == 2010 && GameArray[whatGirl].girlHappinessTotal > 0 && GameArray[whatGirl].girlHappinessTotal < 15)
That simple you can string as many conditions together as you want. Also be careful there can be a logic hole if the girl has 15 happiness.
else if (eventNum == 2010 && GameArray[whatGirl].girlHappinessTotal > 0 && GameArray[whatGirl].girlHappinessTotal < 15) {
} else if (eventNum == 2010 && GameArray[whatGirl].girlHappinessTotal > 15 && GameArray[whatGirl].girlHappinessTotal < 30)
}
Nothing would hit on 15.
else if (eventNum == 2010 && GameArray[whatGirl].girlHappinessTotal > 0 && GameArray[whatGirl].girlHappinessTotal <= 15) {
}
fixes this
Daisy
|
|
|
Post by redcape on Sept 26, 2010 21:38:39 GMT -5
finished with another girl, was about to test but getting this error:
5005-unknown-error-optimizing-byte-code
what should i do?
|
|