| Search this Thread |
|
|
|
|
Frenchie
Original Poster
Forum Resident
Join Date: Oct 2005 |
Hello, I've been working on a chemistry set object and making two functions. One is called "SCIENCE!!" and is basically logic improvement. It increases the potionprogress attribute of the set by 1 every loop and, for testing purposes, is supposed to run the Potion Creation BHAV (consisting of a resetting of potionprogress, a surprised animation, a message about a potion appearing and the creation of a bottle of Vampirocillin) after four loops. The problem is that I get an "Undefined transition" error every time it's supposed to run that procedure. Am I linking my BHAVs the wrong way? Is there more to it than choosing the BHAV as an operation with no argument? What exactly is wrong with my package? Thanks in advance! PS: I've put the potion creation BHAV in the debug menu for easy access. |
|
|
|
|
|
Last edited by The_French_Sim : 28th Jan 2009 at 04:22 PM.
|
|
|
#2 |
|
J. M. Pescado
|
Undefined transition means you have a dangling FFFC. Don't make things lead to FFFC unless you WANT this to happen. |
|
Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off. |
|
|
|
|
|
|
#3 |
|
Frenchie
Original Poster
Forum Resident
Join Date: Oct 2005 |
Thank you, Pescado. After fixing that, I noticed that the animation plays, the message is displayed... but the Vampirocillin is missing. Am I putting the wrong GUID in, or is it an operand problem? |
|
|
|
|
|
|
|
|
#4 |
|
J. M. Pescado
|
Not a clue. I did take a look at the code and there are FFFCs everywhere, though. You might want to remove all that and update it. Plus it looks like the GUID is pointing at a love potion, but even then, you should be getting SOMETHING. Is your create object failing because you are passing it funny arguments? |
|
Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off. |
|
|
|
|
|
|
#5 |
|
Frenchie
Original Poster
Forum Resident
Join Date: Oct 2005 |
I don't seem to have been able to find a tutorial for Create New Object Instance, or a page where the operands were explained, so I thought I'd be pretty much safe setting all the arguments but the GUID to 0. I've attached the new file that goes through the potion creation procedure fine and without errors, except for the fact that it creates absolutely nothing. |
|
|
|
|
|
|
|
|
#6 |
|
Numenor
The ModFather
|
Personally, I don't like to get rid of all the Targets pointing to "Error" (FFFC): if an object causes an error, I'd like to know In fact, your "fixed" chemistry set didn't spawn any error message, but still the potion wasn't created: you've swept the dust under the carpet, but the dirt is still there ![]() I've restored the original Target to "Error" and tested the object; as expected, I got the error message, revealing that there was a problem while creating the potion. Then, I've implemented a "safe" creation method: 1) create the object "out of the world"; 2) find a suitable location (empty tile) for it near the sim; 3) if this is not possible, find a suitable location near the chemistry table; 4) if still it's not possible, spawn a debug message informing that the potion couldn't be created. Result: the potion is correctly created As pointed out by Pescado, you used the GUID for the love potion, not the Vamprocillin, but apart from that, the postion is correctly placed in the lot, near the sim. Multiple potion creations are allowed, because the "Find Location For" opcode does not try one specific tile, but tries different ones before failing.Screenshot 1: the potion created by Randy is created (the nearest free tile is the one behind Rhonda); Screenshot 2: during a storm, the table was hit by a lighting and burned (the fire extinguished itself after some minutes, without damaging the table).Find attached the fixed package. |
|
I've finally started my Journal. Information only, no questions. My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD) I *DON'T* accept requests, sorry.
|
|
|
|
|
|
|
#7 |
|
Frenchie
Original Poster
Forum Resident
Join Date: Oct 2005 |
Thanks Numenor! I'll try to understand how to use the correct arguments for the "Find Location For" primitive by studying your code. ![]() Since I'm in the middle of revision for an exam, I'll edit the thread to "solved" later, if I have no more questions about it. |
|
|
|
|
|
|
|
|
#8 |
|
Frenchie
Original Poster
Forum Resident
Join Date: Oct 2005 |
Some of my potions appear to not work correctly, for example, the Happy potion, supposed to make your sim go platinum, or the Transparency potion (guess) do nothing. I think I may have made a mistake in the Expression operands, when I choose "My aspiration score := 100 (decimal)", it does nothing, when I choose "Stack object's aspiration score := 100 (decimal)", I get a "Must be a person" error, leading me to believe the stack object is the potion. Same goes for the transparency potion, where "Set my alpha" doesn't seem to change anything. The animations placed after the expression functions work fine, though, so there's no error. I've attached the two potions. Sadly, they're both shaped like a florence flask with a smiley face on it, but both are available in the general-misc section of buy mode, with an explicit description (the name of the item is "mysterious chemical" in both cases though). If someone could tell me how to fix the mistake, I'd love it Thanks in advance
|
|
|
|
|
|
Last edited by The_French_Sim : 28th Jan 2009 at 04:27 PM.
|
|
|
#9 |
|
Echo
|
With the transparency, I think you need to set "My Render Flags" to 0x3 first, which tells it that it has to render the sim with transparency. I've found that an alpha of about 0x40 looks pretty good.
|
|
|
|
|
|
#10 |
|
Numenor
The ModFather
|
Apparently, your "Happy Potion" should work with "My aspiration score := 100 (decimal)", but it doesn't. So I checked the "Sim Modder" object that comes with NL: among the various functions, it can set the level of the Aspiration, and even change the Aspiration type. The Sim Modder (GroupID 0x7FFFAA02) performs the trick by calling the BHAV "Aspiration - Cheat" from the PersonGlobals; and this BHAV is interesting, because it doesn't contain instructions like "My aspiration score := ...". The technique used is completely different (some Temps are set, and then the sim wants are recalculated). My suggestion is to import the mentioned "Aspiration - Cheat" BHAV into you potion, and then call it from within the "Feel Great". The "Aspiration - Cheat" requires two parameters: Param0 = Aspiration type (Romance, Knowledge, etc.); Param1 = Aspiration level (-100 ~ +100). You don't want to change the aspiration type, of course, so you should pass as Param0 the current aspiration type of the sim, i.e. "My person data 0x002E (Aspiration)". |
|
I've finally started my Journal. Information only, no questions. My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD) I *DON'T* accept requests, sorry.
|
|
|
|
|
|
|
#11 | |
|
Frenchie
Original Poster
Forum Resident
Join Date: Oct 2005 |
Quote:
Thanks to both of you for the tips - my transparency potion works now, by the way! | |
|
|
||
|
|
|
|
|
#12 |
|
Numenor
The ModFather
|
Yes, you should use the same "Aspiration - Cheat" BHAV in order to change the aspiration type, as well. Of course, you send the right value as Param0. All the possible values are stored into global BCON 0x013E, from line 0x01 (Romance) up to line 0x09 (Grilled Cheese). IMPORTANT: I've examined again the "Aspiration Cheat" and I realized I gave you an inaccurate piece of information. If you DON'T want to change the aspiration type, you must send as Param0 the value of zero, and NOT the "My person data 0x002E (Aspiration)" as suggested earlier. |
|
I've finally started my Journal. Information only, no questions. My latest activity: CEP 9.2.0! - AnyGameStarter 2.1.1 (UPD) - Scriptorium v.2.2f - Photo & Plaques hide with walls - Magazine Rack (UPD) - Animated Windows Hack (UPD) - Custom Instrument Hack (UPD) - Drivable Cars Without Nightlife (UPD) - Courtesy Lights (FIX) - Custom Fence-Arches - Painting-TV - Smarter Lights (UPD) I *DON'T* accept requests, sorry.
|
|
|
|
|
|
|
#13 |
|
Frenchie
Original Poster
Forum Resident
Join Date: Oct 2005 |
Hmmm, for some reason, when I put 9 as the argument in Aspiration - Cheat... I get a wealth sim. I don't quite understand. |
|
|
|
|
|
|
|
|
#14 | |
|
J. M. Pescado
|
Quote:
I only leave error tails on things that I actually WANT to see, otherwise it becomes extremely cluttered and hard to spot where you left the tails. Things like 0x02 can never produce this condition anyway, and if they somehow do, damn the torpedoes, FULL SPEED AHEAD! | |
|
Grant me the serenity to accept the things I cannot change, the courage to change the things I cannot accept, and the wisdom to hide the bodies of those I had to kill because they pissed me off. |
||
|
|
|
![]() |

Have an opinion? Of course you do!



As pointed out by Pescado, you used the GUID for the love potion, not the Vamprocillin, but apart from that, the postion is correctly placed in the lot, near the sim. Multiple potion creations are allowed, because the "Find Location For" opcode does not try one specific tile, but tries different ones before failing.
Twitter
del.icio.us
StumbleUpon
Google