alupinu
Game Owner
NWN NWN: SoU NWN: HotU NWN 2 NWN 2: MotB NWN 2: SoZ
Joined: 16 Feb 2006 |
Posted: Friday, 04 April 2008 05:39PM |
I was wondering if any of you script type people would by chance have a script, "ga_move_object" or something like that. What I'm looking for is a script that will move a PLACEABLE, in my case sarcophagus. The pc will throw a switch and the sarcophagus will slide from one WP to the next revieling a secret trapped door.
I don't know if this is possable but if somebody was willing to kickdown a copy of a script or tell of a stratagy to make this work, I'd be greatly honered.
Thank You. |
|
Sunjammer
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR PC Jade Empire:SE NWN 2 NWN 2: MotB NWN 2: SoZ Mass Effect PC
Joined: 03 Jul 2002 From: Scotland |
Posted: Saturday, 05 April 2008 12:56AM |
When you need a placeable to move the normal approach is create a creature appearance using the placeable's geometry. I can't really help you with how to do that as it's custom content type thing.
The alternative (which more or less worked in NWN1) is to repeatedly create and destroy the placeable with a small offset so that it appears to be moving. Unfortunately this approach doesn't work in nwn2 because placeables take so long to appear and disappear after they have been created or destroyed. After a bit of brainstorming in the nwn2cr channel with Lokey and GrinningFool we happened upon a solution which I've now implemented.
While it works well the code is a little rough still so I want to clean it up before posting it, however I thought you might like to know a solution is on it's way. _________________ Sunjammer Code MonkeyEdited By Sunjammer on 04/05/08 00:57 |
|
alupinu
Game Owner
NWN NWN: SoU NWN: HotU NWN 2 NWN 2: MotB NWN 2: SoZ
Joined: 16 Feb 2006 |
Posted: Saturday, 05 April 2008 01:36AM |
That sound great Sunjammer, I'm glad that are best and brightest are on top of the problem. I knew that I was not the first to think of this. I'll be looking for the post, in the mean time I'll just rig an alternative solution. Thanks. |
|
JuliaM
Game Owner
NWN NWN: SoU NWN: HotU NWN 2
Joined: 04 Sep 2004 |
Posted: Saturday, 05 April 2008 01:44AM |
check the official campaign script in the slums when you get the evil path, a wagon placeable moves |
|
Sunjammer
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR PC Jade Empire:SE NWN 2 NWN 2: MotB NWN 2: SoZ Mass Effect PC
Joined: 03 Jul 2002 From: Scotland |
Posted: Saturday, 05 April 2008 01:13PM |
Actually the wagon placeable is replaced by a creature that looks like a wagon and it moves. _________________ Sunjammer Code Monkey |
|
Sunjammer
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR PC Jade Empire:SE NWN 2 NWN 2: MotB NWN 2: SoZ Mass Effect PC
Joined: 03 Jul 2002 From: Scotland |
Posted: Saturday, 05 April 2008 10:25PM |
The main script exceeds the limit for a single post so rather than split it I've posted it on my website: Click Here
You can also download an ERF containing the main library and a demo MOD of the script in action (not very exciting but I am planning on adding some more functionality to allow placeables to pivot and I want to see if I can produce some similar effects for creating/destroying vertical blockers (but that might require some creative thinking)).
Getting back to the original problem: once you have the sj_move_plc_inc library simply include it in your script and call one of the MovePlaceable* functions.
For example:
and:
View Post/Code in separate window
If you have any comments or questions just let me know. _________________ Sunjammer Code MonkeyEdited By Sunjammer on 04/05/08 22:29 |
|
Indira Lightfoot
Game Owner
NWN NWN: SoU NWN: HotU NWN 2 NWN 2: MotB NWN 2: SoZ
Joined: 24 Feb 2006 |
Posted: Sunday, 06 April 2008 12:55AM |
Smart thinking Sunjammer!
I will definitely download your files and see how it works on me own homefront equipment! This'll be exciting! _________________ Finished MotB or SoZ? Want more epic stuff? Try Trial & Terror , bring an entire party even! Also, spy The Third Sign |
|
alupinu
Game Owner
NWN NWN: SoU NWN: HotU NWN 2 NWN 2: MotB NWN 2: SoZ
Joined: 16 Feb 2006 |
Posted: Sunday, 06 April 2008 01:11AM |
Wow Sunjammer! very impressive! I down loaded the mod. and the main script. But when I looked at the main script I was overwhelmed. I wasn't sure what or where to start. Anyway went back to the forum and copied/past the first script, sound like just what I needed. I just want an object to move from piont A to piont B and thats it. So I pasted the script on to a blank script page and tryed to compile it and I got an error message, quote: "ERROR: PARSING VARIABLE LIST" unquote. Whats wrong? Am I an idiot? (don't answer that!)What do I do now anyidea's?
On the brighter side, I played your demo mod. and was very impressed, it looked and sounded perfect. Keep up the great work!Edited By alupinu on 04/06/08 01:15 |
|
Sunjammer
Game Owner
NWN NWN: SoU NWN: HotU SW: KotOR PC Jade Empire:SE NWN 2 NWN 2: MotB NWN 2: SoZ Mass Effect PC
Joined: 03 Jul 2002 From: Scotland |
Posted: Sunday, 06 April 2008 01:54AM |
Don't let the main script (the include file) put you off: it's there to do all the hard work so you don't have to and (if I've done my job properly) once you've added it to your module you shouldn't have to look at it again (unless you want to).
As for the snippets in my previous post I have to apologise: all the object oTarget... lines end with a comma instead of a semi-colon. Originally I only had one example (the second one) and it was a bit ugly so I did some last minute edits while writing it up. Seems a couple of typos crept in there so sorry for that: if you replace the comma(s) the scripts will compile once the include file is in your module.
I also forgot to mention you will have to place a sound object in the area near the placeable if you want to have sound. The system will turn it on and off but I don't think we can actually create sound objects via scripting (been a couple of years since I was messing with sound objects). _________________ Sunjammer Code MonkeyEdited By Sunjammer on 04/06/08 01:55 |
|
alupinu
Game Owner
NWN NWN: SoU NWN: HotU NWN 2 NWN 2: MotB NWN 2: SoZ
Joined: 16 Feb 2006 |
Posted: Sunday, 06 April 2008 04:45AM |
Sunjammer! My friend you are brilliant,I made the changes like you instucted and not only did it compile but it work like a charm in my mod. Now my mod. has yet another feather in it's hat thanks to you. I just hope one day i can repay you the favor.
If you ever play the mod. "Murder in Dunlop", you just might meet someone you know.
Thanks again friend keep up the good work! |
|