I've been working on a custom mission which is loosely based on the Hitman series of games as well as the Hitman activity.
My original idea was the restaurant where you fight Jyunichi in the Kanto Connection mission, but the location hadn't enough variances of method for killing the target, so I started over and took it to the prison.
I worked on the code using TSS01 as a template as it's already in the prison, but I must've cocked something up along the way, because it stopped working and I couldn't pinpoint where I went wrong, so I decided to start the code over again and not use any mission as a template.
Now it boots, but crashes SR2 afterwards.
Attached is the started-over code, feel free to look at it and tell me what I'm doing wrong.
Onto the actual mission, the plan is to spawn the player at the dock, and place outfit-changers around the prison in appropriate places (i.e. a prisoner outfit in infirmary, a guard outfit in the guard room, maintenance outfit in the underground, etc) which influence behavior from NPCs. So if you wear the prisoner outfit, then you have access to prisoner areas but not guard areas, but if you wear the guard outfit, you'll have access to guard areas but if you go in the prisoner areas, they'll attempt to attack you.
This influences the difficulty of killing the target. So if you're in a prisoner outfit, you can easily walk up to him and beat the crap out of him (before the guards come to stop the fight) but you can't shoot him because you don't have any guns. Dressed in guard outfit, you can shoot him but the guards and prisoners will turn on you for randomly shooting a guy.
(personally, this is a way of teaching myself the SR2 Lua)
My original idea was the restaurant where you fight Jyunichi in the Kanto Connection mission, but the location hadn't enough variances of method for killing the target, so I started over and took it to the prison.
I worked on the code using TSS01 as a template as it's already in the prison, but I must've cocked something up along the way, because it stopped working and I couldn't pinpoint where I went wrong, so I decided to start the code over again and not use any mission as a template.
Now it boots, but crashes SR2 afterwards.
Attached is the started-over code, feel free to look at it and tell me what I'm doing wrong.
Onto the actual mission, the plan is to spawn the player at the dock, and place outfit-changers around the prison in appropriate places (i.e. a prisoner outfit in infirmary, a guard outfit in the guard room, maintenance outfit in the underground, etc) which influence behavior from NPCs. So if you wear the prisoner outfit, then you have access to prisoner areas but not guard areas, but if you wear the guard outfit, you'll have access to guard areas but if you go in the prisoner areas, they'll attempt to attack you.
This influences the difficulty of killing the target. So if you're in a prisoner outfit, you can easily walk up to him and beat the crap out of him (before the guards come to stop the fight) but you can't shoot him because you don't have any guns. Dressed in guard outfit, you can shoot him but the guards and prisoners will turn on you for randomly shooting a guy.
(personally, this is a way of teaching myself the SR2 Lua)