Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Quick Reply
Search this Thread
Forum Resident
Original Poster
#1 Old 3rd Jan 2007 at 2:02 PM
Default Kill a Sim Interaction
Hey everyone.

I am making a sword, which will have a function to kill a sim. So far i got the sims on the lot, name shown in the piemenu. Though the coding for interaction (i used a social object, then editted it into it). But i get an error from it. I was wondering if anyone could shed some light on the problem. I will attach all necessary files, so you can understand me better. From what the error report suggests, it seems that it is from the social object. PS: it will include the error log.

File List:
JB1-Warrior-Sword-Stand (where the sword is spawned from)
JB1-Warrior-Sword (the sword with the kill interactions)
JB1-Kill-A-Sim (social object)
Kill-a-SimAnim (custom death animation)
CommitSuicideAnim (custom death anim)
Attached files:
File Type: rar  Swords.rar (287.3 KB, 362 downloads) - View custom content
Advertisement
Retired Duck
retired moderator
#2 Old 3rd Jan 2007 at 2:42 PM
Hi John,

Just a quick thought (based on a very brief look at the code in the social plugins,) have you tried using "Social - Push Social - User Driven" (global 0x01A5) instead of the straight "Push Interaction" you've got currently? My thought is that just having the "Push Interaction" is only going to push that interaction on one of the sims, not both of them. It might also explain why, according to your error log, the social semi-global code is receiving a bad parameter (you're missing the second sim perhaps?).

It probably sounds like a backwards step, but instead of trying to get the code to work with your custom social straight away, maybe you could try to get it to work with an existing social (like "hug"), then once that's working you can just change the "Create New Object Instance" code to use your new social GUID instead of the existing "hug" GUID. Isolate and fix one issue at a time, so to speak.
Forum Resident
Original Poster
#3 Old 4th Jan 2007 at 7:46 AM
Thanks echo, i will test it asap
Forum Resident
Original Poster
#4 Old 4th Jan 2007 at 10:09 AM Last edited by JohnBrehaut1 : 4th Jan 2007 at 10:17 AM.
ok, i think that made some progress. I changed it to the "Social-Push Social-User Driven" and changed the create new instance guid to the hug interaction. I now get this error. "Error: Hit Break Point Primitive."
Retired Duck
retired moderator
#5 Old 4th Jan 2007 at 10:40 AM
That either means you got to a "Debug" command which didn't point anywhere, or you somehow forced an error on something. Look at the error log and see if you can figure out where the error is occurring.
Forum Resident
Original Poster
#6 Old 4th Jan 2007 at 10:59 AM
ok, i dont really get the error log, besides seeing a bunch of words. To me it just looks like it is saying which functions it performed in the interaction, nothing about where the error occured. Maybe you could show me a little about them ? I will include the log.
Attached files:
File Type: rar  ObjectError_N001_t28758.rar (11.9 KB, 33 downloads) - View custom content
Retired Duck
retired moderator
#7 Old 4th Jan 2007 at 11:33 AM
For a really detailed explanation of everything that's in an error log, check out the end of this post:
http://www.modthesims2.com/member/s...ad.php?t=212101

But given the one you've just posted:

Object id: 141
name: N001_User00237 - Ray


This tells me that the error occurred in the stack belonging to object 141 (a sim called Ray). That means that "Me" or "My" will refer to this Sim in any code that is being run. It also means that the code is probably an interaction, because interactions are run in the sim's stack.

Error: Hit Break Point Primitive.
This tells me what you already mentioned before - That you hit a break point (Debug) primitive.

Frame 7:
Stack Object id: 141
Stack Object name: N001_User00237 - Ray

This is the top frame, so it was the code that was being executed at the time. The Stack Object ID is set to 141, which is Ray again.

Node: 2
Node = line. The second line of the particular function is where the error occurred.

Tree: id 439 name 'Social - Verify Params' version -32760
from global

This is which function was running. It was "Social - Verify Params" which has the instance number of 439 (or in hex, 0x01B7). Since that's a global function that is looking at the parameters you've passed a social, odds are your problem is caused by passing invalid parameters.

Params: 141 0 0 Locals:
These are the parameter values that were passed to the function (and where the local values would be if there were any). Param 141 is the object ID of Ray, but those two zeros don't look right. You should definitely check what the parameters are supposed to be doing.

Frame 6:
Stack Object id: 141
Stack Object name: N001_User00237 - Ray

This is the next frame down, so it was the function which called 'Social - Verify Params'. Stack object is still Ray.

Node: 0
Tree: id 421 name 'Social - Push Social - User Driven' version -32758
from global

This is the global function you called. It's up to node 0x00, which means that it's doing its very first step (which is apparently to call the 'Social - Verify Params' function).

Params: 0 0 0 0 Locals: 0 0 0 0
This doesn't look right. All the parameters are set to zeros? I'd guess that one of them would have to be the ID (object or neighbour, not sure) of the target sim at the very least. (I believe her name is Elaine? ) You should probably investigate the 'Social - Push Social - User Driven' function a bit more carefully, see if you can figure out what the parameters are supposed to be.
Forum Resident
Original Poster
#8 Old 4th Jan 2007 at 12:05 PM
thanks echo, i now understand that most problems occur when there is a 0 in either the params or locals, thank you I will have a look throw some other objects that spawn social commands.
Forum Resident
Original Poster
#9 Old 5th Jan 2007 at 1:23 PM
ok, i found an object which had the coding on how to summon the social hug interaction, basically, it tests whether it is autonomous or not and makes it go to whichever one it is I am just about to test it ingame.
Forum Resident
Original Poster
#10 Old 5th Jan 2007 at 4:26 PM
I am confused, i made it so each thing in the new bhav lead to an error where there was falses. But no error occured, but the action was canceled.
Retired Duck
retired moderator
#11 Old 5th Jan 2007 at 11:38 PM
John - did you find out what the parameters were supposed to be though? Autonomy is probably not all that relevant in finding the cause of the error, but the operands and their values will be.
Instructor
#12 Old 6th Jan 2007 at 12:40 AM
John, after playing around with it for awhile and tweaking this and changing that I finally got it to work.

Here's the changes I made:
-I took the commit suicide and killasim animations that you had in seperate packages and added them to Sword and Kill-a-Sim pacakages.
-Added a Launch Social BHAV to the sword which is now called instead of the Push Interaction Primitive.
-Fixed it so that when selecting the Kill a Sim option, the sim that will be doing the killing won't show up as an option.
-You had set to Remove Object Instance for the killed sim, I changed it to call the Kill Sim global instead.
-Changed the IK Object of the animations in the Kill-a-Sim Social to My 0X000B (Simpe was showing it as being "IK Object: [UNK: 0x00A0] 0x0000")

See if it works for you.
Attached files:
File Type: zip  JB1-Warrior-Sword.zip (337.9 KB, 114 downloads) - View custom content

Tired of getting ripped off by paysites?
http://paysites.mustbedestroyed.org/
Forum Resident
Original Poster
#13 Old 6th Jan 2007 at 2:06 AM
Echo, yes, in the new bhav i found, there was different parameters. Thanks Smonaff, you's really helped me out.
Forum Resident
Original Poster
#14 Old 6th Jan 2007 at 2:09 AM
That's strange, it says i am not authorised to get that file.
Retired Duck
retired moderator
#15 Old 6th Jan 2007 at 4:48 AM
John - Check out the news, then log out and log back in again. You're a featured creator, you've been switched to a different fileserver.
Forum Resident
Original Poster
#16 Old 6th Jan 2007 at 8:17 AM
I was in a rush this morning, so i didnt see the news. Thanks Echo once again.
Forum Resident
Original Poster
#17 Old 6th Jan 2007 at 10:37 AM
Holy Cow, that coding looks complicated, smonaff, thank you once again.
Forum Resident
Original Poster
#18 Old 6th Jan 2007 at 12:32 PM
IT WORKED !!!!! Thank you Smonaff and Echo, for being such great helpers. I just need to make a few little adjustments and i will upload it after the weekend. Thank you guys so much.
Forum Resident
Original Poster
#19 Old 6th Jan 2007 at 2:01 PM
Instructor
#20 Old 6th Jan 2007 at 2:30 PM
Good job. I see you got it so that both sims have a sword, I was thinking earlier that it would be cool if they both had one so that they could duel.

Tired of getting ripped off by paysites?
http://paysites.mustbedestroyed.org/
Retired Duck
retired moderator
#21 Old 6th Jan 2007 at 2:35 PM
Very spiffy! Congrats! You're going to be quite popular I think.
Forum Resident
Original Poster
#22 Old 6th Jan 2007 at 4:18 PM
I think i may have a way of making it so it doesnt look like the sims arent holding onto the sword. What i have done is unsnap it from the slot and use anims to hold it in the hand. Then once the anims are done, snap it back in.
Forum Resident
Original Poster
#23 Old 9th Jan 2007 at 8:39 AM Last edited by JohnBrehaut1 : 9th Jan 2007 at 8:45 AM.
I have a question for you Smonaff, I was wondering if that bhav you added (the social lauch one) directly links into the Kill a Sim function. What I am trying to do is make an alternative option from Kill a Sim, called Fight a Sim, so instead of the sim dying, they gain fun. I made it today, but when i went in game, the names where doubled in the Kill a Sim section in the pie-menu. So I was wondering, if i have to change something in the coding, or clone it then change some things ?
Instructor
#24 Old 9th Jan 2007 at 3:38 PM
Ok, here's what you can do, extract the Interaction - Kill A Sim BHAV. Then from the resource actions menu select add and select Interaction - Kill A Sim as the BHAV to add. Change it's name to something like Interaction - Fight A Sim and change it's instance number, be sure to make the changes to the one you added and not the original. In the Pie Menu Functions have the Fight A Sim.../ interaction's Action BHAV point to Interaction - Fight A Sim, you can have the Guardian BHAV point to Interaction - Kill A Sim - Test. In the Interaction - Kill A Sim BHAV select the node that says Create New Object Instance (of GUID 0x0027C900) and then from the special buttons click Insert via True which will create a new line below it and link everything properly, change this new line to Expression (Stack Object's attribute 0x0002 := Literal 0x0000), do the same thing for Interaction - Fight A Sim but set the new line to Expression (Stack Object's attribute 0x0002 := Literal 0x0001). Now open up the JB1-Kill-A-Sim.package, and select the Interaction - Person B BHAV, next select the node directly above [global 0x0189] Kill Sim (0x0000) and click the Insert via True button, change the new line to Expression (Stack Object's attribute 0x0002 "Interaction Result" == Literal 0x0000), set the True target to point to the line for [global 0x0189] Kill Sim (0x0000) and the false target point to [global 0x0111] Standard Exit (0x0000).

Tired of getting ripped off by paysites?
http://paysites.mustbedestroyed.org/
Forum Resident
Original Poster
#25 Old 9th Jan 2007 at 5:12 PM
Thanks Smonaff, I will check it next time i go in game.
Page 1 of 2
Back to top