Morphing player into a vehicle

Discuss all aspects related to modding Zandronum here.
Post Reply
User avatar
AqwerfNet
New User
Posts: 15
Joined: Sat Aug 27, 2016 10:23 pm
Location: Japan

Morphing player into a vehicle

#1

Post by AqwerfNet » Mon Oct 03, 2016 7:43 am

Hello Im a new here to modding,
In my testing project i wanted to make some vehicle, I already checked in AOW how it works but i don't get it . . .
Like why there is a MD3 models, How to morph a player, and how it works!

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

Re: Morphing player into a vehicle

#2

Post by Lollipop » Mon Oct 03, 2016 11:43 am

I hate to be that guy, but this is a big bite for a beginner. If you really want to go this route, though, then I neither can or will stop you.

A playermorph is a playerpawn just like the regular player actor, but there are special rules for their function, which I recommend that you look up on the zdoom wiki.
To make something actually morph you need to have a powermorph actor defined for that actor as well. You also need the naming for these things to be correct for it to work.
Ex:
actor Vehicle1 : playerpawn {} //contains whatever you want
actor PowerVehicle1 : PowerMorph {} //You just append the actor name to the word Power. When this item is given to a player, it morphs to the given actor.

Please take into concideration that I have not put what these actors actually need into their definitions. I recommend that you read about this on the zdoom wiki, all the parameters, rules and so on.

Now, AOW is a shit thing to open up and look into, because it's rather complicated and made on a higher level than beginners can be expected to understand. I would recommend hunting for examples with a more simple internal construction.

User avatar
AqwerfNet
New User
Posts: 15
Joined: Sat Aug 27, 2016 10:23 pm
Location: Japan

Re: Morphing player into a vehicle

#3

Post by AqwerfNet » Mon Oct 03, 2016 2:18 pm

Ok Thank you very much! :biggrin:
So MD3 models are useless for me?(for morphing)

User avatar
Ivan
Addicted to Zandronum
Posts: 2229
Joined: Mon Jun 04, 2012 5:38 pm
Location: Omnipresent

Re: Morphing player into a vehicle

#4

Post by Ivan » Mon Oct 03, 2016 3:16 pm

AqwerfNet wrote:Ok Thank you very much! :biggrin:
So MD3 models are useless for me?(for morphing)
Funny how of all things he said you picked apart the models to be the important thing...

You need nothing but code to do the morphing right. Anything else is extras. Sprites, models etc.
=== RAGNAROK DM ON ... uh... dead forever? ===
=== ALWAYS BET ON ... uh... dead forever? ===
=== Who wanta sum wang? ===
=== Death and Decay - A new Monster/Weapon replacer ===

User avatar
AqwerfNet
New User
Posts: 15
Joined: Sat Aug 27, 2016 10:23 pm
Location: Japan

Re: Morphing player into a vehicle

#5

Post by AqwerfNet » Mon Oct 03, 2016 3:52 pm

Oh Really? Then thank you :3

Edit:
But when my vehicle is flying, it slide and accumulate speed, how to fix that? :question:
And i can't go up or down with "fly up" and "fly down" :cry:

User avatar
AqwerfNet
New User
Posts: 15
Joined: Sat Aug 27, 2016 10:23 pm
Location: Japan

Re: Morphing player into a vehicle

#6

Post by AqwerfNet » Fri Oct 07, 2016 5:53 pm

I hate to doing that, But UP,

I can't figure whats the problem is about " slide and accumulate speed" :(
And about "fly up" and fly down" with a morph, i have no clues . . .

Also here is my code : http://pastebin.com/WqAjYrNn

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

Re: Morphing player into a vehicle

#7

Post by Lollipop » Fri Oct 07, 2016 7:35 pm

I'm not an expert on flying player classes, but my best guess would be:
1. Try removing the floatspeed property from the shipbase actor. This is probably causing the weird speed accumulation you describe, although I could be terribly wrong on this one.
2. Don't defien the same property twice, as you did with player.jumpz in the shipbase actor. This isn't only bad practice, it might even make your mod break.
3. Also, IIRC player.jumpz also determines the vertical flying movement speed of a flying actor. Change that value to a positive number in order to be able to fly up and down with the buttons.

I give no guarantees that any of this will work, as I didn't test any of it. Please let us know if it did though, it would make for good research on actor acceleration.

User avatar
AqwerfNet
New User
Posts: 15
Joined: Sat Aug 27, 2016 10:23 pm
Location: Japan

Re: Morphing player into a vehicle

#8

Post by AqwerfNet » Fri Oct 07, 2016 8:04 pm

Okey , I tried what you said:
1) Change nothing,
2)Same
3)Same

Well, Its very weird ...

Lollipop
Zandrone
Posts: 1124
Joined: Tue Jul 24, 2012 10:34 am
Location: Denmark

Re: Morphing player into a vehicle

#9

Post by Lollipop » Sun Oct 09, 2016 11:49 am

In that case I'm completely clueless as to why it acts as it does.
Is there anyone else with insight in this?

User avatar
AqwerfNet
New User
Posts: 15
Joined: Sat Aug 27, 2016 10:23 pm
Location: Japan

Re: Morphing player into a vehicle

#10

Post by AqwerfNet » Sun Oct 09, 2016 12:45 pm

Okay I FINALLY FOUND!!!!!
Erm. . . So if you make a Flying Morph, Don't Forget To put SetPlayerProperty (0, 1, 3) In Decorate Spawn States....

Post Reply