| Search this Thread |
|
|
|
| Ambular |
I'm looking at trying to create a fairly simple effect--click an object, select a menu option, and it changes to another object. I have a pretty good beginner's grasp of SimPE, cloning and changing the properties of various items, GUID's and so on, but I'm not sure how to go about setting up the pie menu and switching the objects out. Could someone point me at a tutorial(s) that would help? Thanks! |
|
|
|
|
|
#2 |
|
Jasana_BugBreeder
|
Depending on what you mean by 'change to another object', the way to do it may be different; anyway, you need to modify BHAVs. 'Another object' means really another object, with different GUID and functionality? Then create new object with [prim 0x002A] Create New Object Instance, delete old one with [prim 0x0012] Remove Object Instance; both object menus can be tweaked. 'Another object' is a sub-mesh or another state of current object (you can see it in food code)? Then either show/hide sub-meshes via [prim 0x006D] Change Material, or simply assign another graphic state via [prim 0x0002] Expression (Stack Object's 0x0000 (graphic) := Literal <number from #STR 0x85>). Of tutorials, start from reading Echo's. For more details about particular primitives, check AdidasSG2's tutorials in Modding InfoCenter - Simantics and BHAVs thread. I'm afraid there's no tutorial which explains exactly what you want to do (common situation with BHAVs), so you have to compile the available information to produce your code
|
|
|
|
|
|
#3 | |
| Ambular |
Quote:
Wow! Thanks, now I have to go see if I can figure out what you just said. LOL! XD ('Another object' is an entirely different one with a different GUID, yes. The tips are appreciated. :) ) |
|
|
|
|
|
|
#4 | |
|
Jasana_BugBreeder
|
Quote:
If you did nothing with BHAVs, you absolutely must follow all Echo's tutorial. The task you've chosen isn't for beginners so you have to get more understanding of BHAVs before starting. Actually, I had never tried the first way (create and delete), so I can only guess how to do it :-< An example of CreateNewInstance call: [prim 0x002A] Create New Object Instance (GUID 0x4C7EF534, place: out of world (put new object id in Stack Object), Create object normally, fail if tile is non-empty: False, pass Temp 0 to main: False, move in a new Sim: False, copying design mode materials from object in Temp 5: False) opcodes for this: 34F57E4C060000000000000000000000 As always, guids are entered by byte in reversed order (34F57E4C for guid 0x4C7EF534), make sure you replaced it with yours. If you change opcode 0x10 (numeration start from 0) to 02, the last line will change to copying design mode materials from object in Temp 5: True (Naturally, you should put some object ID to Temp5 before that.) It is useful if your new and old object share the same recolors, and you want to make new object have exactly the same recolor as currently used on old object. I used it in my tea set - you can check it to see what I mean ![]() The most hardest in your task, in my opinion, would be to place your new object exactly where the old one was. It's hard because objects likely don't allow intersection. So you have to create object out of world, then probaly delete old object, then in new object's code check when old object is gone and then take its place. Maybe someone will suggest a better logic
|
|
|
|
|
![]() |

Have you made some custom content?

Twitter
del.icio.us
StumbleUpon
Google