Did you know? All of these messages will likely be replaced before release.

[UScript] Using the Grab key

For questions and discussion about UnrealEd, UnrealScript, and other aspects of Unreal Engine design.

Moderators: Semfry, ividyon

User avatar ividyon
Administrator 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

User avatar Mister_Prophet
Red Nemesis Leader 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.

Kaka
Skaarj Berserker Skaarj Berserker
Posts: 475
Joined: 12 Nov 2007, 00:21
Location: Trójmiasto
Contact:

Subject:

Post Posted: 29 Nov 2007, 14:17

Such feature will be available in Ravens TCOTools, released right adter The Chosen One. Soon :P

User avatar Raven
Skaarj Warlord 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!
Image
http://turniej.unreal.pl/portfolio

User avatar ividyon
Administrator 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

User avatar Raven
Skaarj Warlord 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:

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!
Image
http://turniej.unreal.pl/portfolio


Who is online

Users browsing this forum: No registered users and 30 guests

Copyright © 2001-2024 UnrealSP.org

Powered by phpBB® Forum Software © phpBB Limited