Page 1 of 1

RPG lua questions..

Posted: Tue Dec 29, 2015 7:22 pm
by thelegend
I am interested in creating an RPG map. The map should be very large and full detailed, the story should take some hours at least. I already have a working save/load function and was also playing around with some things in Zero Editor. I know it's a big plan and I also know it's going to be harder than hard. But I would like to accept that challenge. My only bad is I am not a good scripter at all. So I have some questions. A lot of. Thank you for reading and helping me.
Alright let's start:

1) Is it possible to change the geometry of an addon mesh through lua? Example: A certain unit has an addon mesh attached to his head (Hair geometry for example). Is it possible to change the geometry so a unit would have different hair (since the geometry has changed).

2) Is it possible to use this line:

Code: Select all

AcceptHero(0)
when you leave a certain vehicle? I wanted to create a large vehicle and if you leave this certain vehicle you should be able to choose it as a spawn location (commandhover/ You will spawn high above on the floow instead of spawning behind the vehicle).
I know I am a bit confusing. I just would like to know if this is possible OR is it possible to change the location where you spawn AFTER you left a vehicle? Instead of spawning behind you should be able to spawn on top.

3) Region Limit...We all know the number of 70. You can only load up to 70 regions in total in your current mode. But were they talking about 7o regions which are being loaded or about active regions? What about DeactivateRegion and ActivateRegion? Could you have more regions than needed if you enable and disable them from the beginning?


That's all so far. Please ask me if you misunderstood anything.

Re: RPG lua questions..

Posted: Tue Dec 29, 2015 8:19 pm
by Teancum
thelegend wrote:1) Is it possible to change the geometry of an addon mesh through lua? Example: A certain unit has an addon mesh attached to his head (Hair geometry for example). Is it possible to change the geometry so a unit would have different hair (since the geometry has changed).
Yes, but it would not take effect until respawn.

Re: RPG lua questions..

Posted: Mon Jan 18, 2016 12:13 am
by [RDH]Zerted
thelegend wrote:I just would like to know if this is possible OR is it possible to change the location where you spawn AFTER you left a vehicle? Instead of spawning behind you should be able to spawn on top.
You could always teleport someone after they spawn to wherever. You might need to manually adjust the entity matrix (the location you teleport to) so the location is slightly higher than the vehicle's location.

Re: RPG lua questions..

Posted: Fri Jan 22, 2016 8:49 am
by thelegend
I am sorry if I do not reply so much. I spend a lot of time to my map. Anyways thank you both for the replies.
Teancum wrote:Yes, but it would not take effect until respawn.
Alright, thanks. This might be very useful.

@Zerted: I found another way which makes it easier. But it's not going to work for all vehicles. I moved the Vehicle Mesh+all it's contents a few meters away from the DummyRoot. Now when I leave the vehicle, I fall onto the stern instead off the vehicle (It's a boat which should drive on water only). But it affects the movement controls a bit since the entire vehicle moved back just a bit.

There's one thing I have been thinking about for quite a while. How to swap Spawn Paths? For example: There's one CP. Two paths. Objective 1: Player can spawn at Path 1. Objective 2: Player now has to spawn at a certain path (Second Path). I saw this on other campaign missions. Currently I am working on something else and would like to know if SetProperty works for CommandPosts (Swapping the Path Names)? I am going to try this asap. I will reply back if it worked or not.
Thanks all for their help.

Edit: Yeah it worked. I have full control over commandposts. I am very happy about that.