More questions

Topics regarding Scripting with Reality Factory
Post Reply
Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

More questions

Post by Danimita92 » Sat Sep 27, 2008 5:16 pm

1. Is there a way to grab the coordinates of exactly where a projectile hits in the level?
2. When you set a weapon for a Pawn, it grabs a model set in weapon.ini with the same skeleton as the Pawn you're setting it for, right? How many can you set at the same time? For example set one for one hand and then set a Shield for the other one.

Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: More questions

Post by Danimita92 » Mon Sep 29, 2008 6:25 pm

Please?

User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: More questions

Post by Juutis » Tue Sep 30, 2008 8:28 am

Danimita92 wrote:2. When you set a weapon for a Pawn, it grabs a model set in weapon.ini with the same skeleton as the Pawn you're setting it for, right? How many can you set at the same time? For example set one for one hand and then set a Shield for the other one.
Depends on the version you are using. In 076 you can add accessories to pawns. Basically the same thing as weapons but you can add as many as you want. In Jay's Community Releases you can add multiple weapons with the SetWeapon() command. In federico's physics version I think only one weapon per pawn is possible.
Pain is only psychological.

Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: More questions

Post by Danimita92 » Tue Sep 30, 2008 3:39 pm

Thanks a lot, Juutis. I guess he'll have to leave physics to a side if he wants to have multiple weapons at a time. Is there any way to do number 1 on 076?

User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: More questions

Post by Juutis » Tue Sep 30, 2008 3:52 pm

No, I don't think so. You could use pawns for projectiles... but that's not something you wanna do. Seriously.
Pain is only psychological.

Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: More questions

Post by Danimita92 » Tue Sep 30, 2008 5:21 pm

How about a pawn that shoots forward in the direction the camera's aiming at, *and then when the pawn can't go forward anymore*, the script returns it's coordinates?

Could that work? And if so, how would I be able to do the part in between * *?

User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Re: More questions

Post by Juutis » Wed Oct 01, 2008 11:59 am

That's what I meant with 'pawns for projectiles'. Like each projectile would be a pawn, not a projectile. Yes, it's doable but if each projectile is a pawn... that's not good. Or are you planning like one weapon with these special projectiles? I guess that would work. I've actually done. I had a crossbow that shot arrow pawns and they sticked to enemies and walls and you could climb by jumping on them.
how would I be able to do the part in between * *?
The flymove() command returns false if the pawn hits something so it can't move. So:

Code: Select all

if(flymove(current_pitch, current_yaw, speed) = false)
{
     //whatever you want to do when the pawn collides with something
}
Pain is only psychological.

Jay
RF Dev Team
Posts: 1232
Joined: Fri Jul 08, 2005 1:56 pm
Location: Germany

Re: More questions

Post by Jay » Wed Oct 01, 2008 9:16 pm

Yes i've done something like that too, i used it in early days for a moonbeam spell.
Everyone can see the difficult, but only the wise can see the simple.
-----

Danimita92
Posts: 335
Joined: Sat Feb 09, 2008 5:47 pm
Location: Lanzarote/Canary Islands/Spain

Re: More questions

Post by Danimita92 » Wed Oct 01, 2008 11:10 pm

Cool, sounds great, thanks for the info Juutis

Post Reply