[UScript] Using the Grab key
6 posts •
Page 1 of 1
- ividyon
- Administrator
- Posts: 2354
- Joined: 12 Nov 2007, 14:43
- Location: Germany
- Contact:
Subject: [UScript] Using the Grab key
Post Posted: 29 Nov 2007, 13:36
I want to make some use out of the Grab key and use it as a Use key - so for example guns are picked up by using them instead of just walking over them. But how exactly do you check in UnrealScript whether the player presses the Grab key while being near and looking at the actor? (Using the actor)
UnrealSP.org webmaster & administrator
- Mister_Prophet
- Red Nemesis Leader
- Posts: 3098
- Joined: 11 Nov 2007, 23:30
- Location: Lost in Oraghar
Subject:
Post Posted: 29 Nov 2007, 13:54
We're doing the use/grab key thing in RD so you can ask UA about it.
- Raven
- Skaarj Warlord
- Posts: 807
- Joined: 12 Nov 2007, 09:39
- Location: Nørresundby
- Contact:
Subject:
Post Posted: 29 Nov 2007, 15:00
This can be done by altering player class (adding exec function USE) or by mutator. In TCO we've done that in player class. Can make mutator for ya. I'll see what has to be done to use weapons not pick 'em up without changing weapon code.
Madness, as you know, is like gravity…all it takes is a little push!
http://turniej.unreal.pl/portfolio
http://turniej.unreal.pl/portfolio
- ividyon
- Administrator
- Posts: 2354
- Joined: 12 Nov 2007, 14:43
- Location: Germany
- Contact:
Subject:
Post Posted: 29 Nov 2007, 17:01
So there's no way to put some function in the actor itself which checks for the Grab key being pressed? I recall Movers being activated by pushing the Grab key (bUseTriggered or something)..
UnrealSP.org webmaster & administrator
- Raven
- Skaarj Warlord
- Posts: 807
- Joined: 12 Nov 2007, 09:39
- Location: Nørresundby
- Contact:
Subject:
Post Posted: 30 Nov 2007, 09:13
You can try make use of a tick or state like:
You can modify this, and it'll search for PlayerPawn's in radius and checks if aUp is 1.
Code: Select all
var PlayerPawn PP;
auto state Updater
{
begin:
foreach RadiusActors(class'PlayerPawn', PP,CollisionRadius)
{
// do smth here. eg if(PP.SomeVariable == 1)
if(PP.aUp== 1)
{
//smth else
}
}
sleep(0.001);
GoTo('begin');
}
You can modify this, and it'll search for PlayerPawn's in radius and checks if aUp is 1.
Madness, as you know, is like gravity…all it takes is a little push!
http://turniej.unreal.pl/portfolio
http://turniej.unreal.pl/portfolio
6 posts •
Page 1 of 1
Who is online
Users browsing this forum: No registered users and 30 guests