Jump to content
  • entries
    55
  • comments
    179
  • views
    15,727

Development as a modder


Storms of Superior

681 views

OK. Welcome back, folks. I keep jumping from project to project. I keep getting ideas regarding how things may be done. Therefore, I'm back to the Crystal Corridor.

 

I woke up today without any thought about working on a mod. Then I saw one of the newest mods (http://www.loverslab.com/files/file/2866-the-bondage-house/), and I began thinking about it again. That mod has a "portable prison," as the author states. I remembered other ways that objects are made to be used.

 

One idea I remembered was the mod that adds a craftable, portable bedroll. Dropping it on the ground allows it to be activated. I began thinking about making a similar activator to drop on the ground and use to open the Crystal Corridor. After a short time, I realized that a script would have to be added to place the activator object back into the player's inventory automatically.

 

Another idea was to make the activator object usable in the inventory screen, while the last one involved a book that could be opened to automatically teleport the player to the Crystal Corridor.

 

After all of this, I found myself wondering if there are any generic scripts that can be used to teleport the player.

 

While browsing the CK, I found several leads that may or may not lead to my desired conclusion:

 

-I found generic scripts for teleportation, but they have no documentation strings, and therefore, no information.

 

-I took a look at the tabs (while trying to edit objects) "Linked Ref" and "Linked From." Perhaps these can be used for my purposes.

 

Some things that help up my progress today:

 

-I tried to use Azura's Star (duplicated, of course) to link to the door that is already set up inside the Crystal Corridor, but, since it isn't a door, there seems to be no teleportation set up in its edit box.

 

So, with that said, any thoughts from experienced folks?

6 Comments


Recommended Comments

Teleporting the player is very easy.

All you have to do in any script is:

akplayer.moveto(object)

Where akplayer is a property pointing to the player (actor property akplayer auto and set it to the player actor) (or you can use game.getplayer().moveto(object) instead)

And (object) is an objectreference pointing to something in the game world.

 

For example, in CCAS I use this:

;wherever you put your properties
actor property playerref auto
objectreference property ccas_startmarker  auto  

;in the script function
playerref.moveto(ccas_startmarker)

And I set playerref to point to the player and ccas_startmarker to point to an xmarkerheading. What object you set your objectreference to doesn't matter - I think it can be anything in whatever cell you want. (?)

 

 

So if you want to teleport the player when the player uses an item, in your activate script you'd just have the game.getplayer().moveto(wherever) script.

Link to comment

So to teleport the player back and forth between the current location and your destination cell, you'd probably want to do something like:

1. game.getplayer.placeatme(xmarker)   ;where xmarker is any sort of object, but preferably an invisible marker. This is so that when you want to teleport the player back, there's a marker at your starting position.

2. game.getplayer.moveto(crystalcorridormarker)   ;where crystalcorridormarker is something, again preferably an invisible marker, in your destination cell.

 

When you want to teleport back to the real world, you would:

3. game.getplayer.moveto(xmarker)  ;back to the original position

4. xmarker.disable()  ;get rid of the xmarker so you can reuse it [might need to markfordelete?]

Link to comment

OK. Good. It's a one-way teleport.

 

So to teleport, all I really need in a teleport marker like one that comes with a door. I don't even need a door? If I don't need a door, then I can keep people from cheating by activating the doors and putting them in plain sight. If I don't include doors in the first place, then the workload to cheat will be too big to bother.

 

Correction: I will include doors, but they are all one-way doors.

Link to comment

Not like the door marker. You want a duplicate of an xmarker or xmarkerheading - in the cell, it'll look like a red box, exactly like a door marker but red instead of yellow.

 

I'm not sure what you mean by one-way doors... I don't think that's actually possible.

Link to comment

I was going good to disable all of the doors that could allow access back to the original spot. Only one way into TCC and the like. Like a flow chart.

Link to comment

I'm too tired. I just lost all of that work. I think I can do it again after some sleep. Sleeping is a gamble for me where learning is concerned. It causes me to forget, but I think some important knowledge just stuck to me like sweaty underpants (lol). I'll redo it later and then ask for help to round it out and clean it up. I can't keep going while so prone to doing dumb shit like I just did. OK have an awesome day.

Link to comment
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use