PlaceAtMe doesn't work when used with an object I created

Post » Tue Jun 19, 2012 11:18 pm

Hello everyone, I think everything is in the title, as long as I try to spawn an object I created with the creation kit, the command returns "compiled script not saved". (The console is not very talkative when it comes to errors...) I don't know what to do, scripts don't work neither

Game.GetPlayer().PlaceAtMe(Game.GetForm(0x010063D2))

doesn't do anything, as 010063D2 is an object I created's ID. I tried with several objects, books, activators, and none of them could be spawned...

Thanks for your help !

PS : also, my "help" command doesn't work at all, it displays me "help usage 0 - all ... blablabla" everytime. And I know I use it the right way, for example "help dragon 0" does what I just said.
User avatar
Princess Johnson
 
Posts: 3435
Joined: Wed Feb 07, 2007 5:44 pm

Post » Wed Jun 20, 2012 3:13 pm

So you're using the console's PlaceAtMe?

Game.GetPlayer().PlaceAtMe(Game.GetForm(0x010063D2)) would be how you do it in a script. In a console it's different. Instead, you would use:

Player.PlaceAtMe XX0063D2 1

where XX would be your mod's place in the load order (02 if it's the third mod, 08 if ninth, D2 if two hundred and eleventh, etc).
User avatar
Budgie
 
Posts: 3518
Joined: Sat Oct 14, 2006 2:26 pm

Post » Wed Jun 20, 2012 4:05 am

Ok ! I didn't know the first 2 numbers were for that, but I try to do it in scripts actually...
Because it didn't work in the script I tried to do it in the console with
Player.PlaceAtMe 010063D2 1
Now I know why it didn't work, but in the script, I don't know the load order of the mod...

PS : It works in the console now, thank you :) But I still need to know how to deal with the script.
User avatar
Sarah Kim
 
Posts: 3407
Joined: Tue Aug 29, 2006 2:24 pm

Post » Wed Jun 20, 2012 2:02 am

Console commands don't play nice with Papyrus in any case. I just made a simple adjustable "Conjure anything" spell in my mod that lets me summon the things I created for testing (Spellbooks to learn the new spells, Critters, weapons, etc.)
User avatar
CArla HOlbert
 
Posts: 3342
Joined: Wed Feb 21, 2007 11:35 pm

Post » Wed Jun 20, 2012 2:35 am

In scripts, you need to use properties, not the form IDs. So let's say you are trying to spawn an actor, your script would be:

;;;;;Actorbase property MyActorBase autoEvent OnInit()    Game.GetPlayer().PlaceAtMe(MyActorBase, 1)    EndEvent

Then after you compile the script and attach it to an object, you edit its properties in order to point MyActorBase at the base actor you want.
User avatar
Kanaoka
 
Posts: 3416
Joined: Fri Jun 16, 2006 2:24 pm

Post » Wed Jun 20, 2012 1:09 pm

You sir made my day. :biggrin: Thank you, I don't know why I didn't think about it.
I think this would be useful for you as well finally Redwood Elf xD Spells are nice but sometimes when you have too much spells to cast it's anoying. I already have a spell which makes the player sit crosslegged on the ground. Looking forward to using Keyboard events lol.

Anyway, any idea for my "help command" problem ? Doesn't matter much if not.
User avatar
Miranda Taylor
 
Posts: 3406
Joined: Sat Feb 24, 2007 3:39 pm

Post » Wed Jun 20, 2012 5:14 am

For the help command, you probably just need to scroll up on the console. Use the PageUp and PageDown keys on your keyboard.
User avatar
Lynette Wilson
 
Posts: 3424
Joined: Fri Jul 14, 2006 4:20 pm

Post » Wed Jun 20, 2012 9:48 am

Lol I feel so stupid, thank you. ^^
User avatar
Bethany Watkin
 
Posts: 3445
Joined: Sun Jul 23, 2006 4:13 pm


Return to V - Skyrim