x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Is this the right way to possess another pawn?

I was trying to possess another pawn by using the main controller , yet i ended up with this error! alt text

so whenever a player hit (K) will control another pawn, is there a way to do this.

Product Version: Not Selected
Tags:
wrong.jpg (386.2 kB)
more ▼

asked Apr 02 '14 at 10:04 PM in Blueprint Scripting

avatar image

Alnadel
5 4 6 8

avatar image Atonnis Jun 03 '14 at 06:24 PM

Sorry for sticking in so late down the line, but this is relevant and could be for others.

I'm still trying to figure this out. How can you possess another character on a begin overlap? I never have a Target to reference in the Possess command. How do I reference the actor I'm overlapping?

avatar image Alnadel Jun 04 '14 at 12:26 AM

alt text Try this

possess.jpg (98.0 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

There is a null reference.

You might need another way of getting the reference to the new pawn to posses, with the index of 1 that would be the 2nd player that joined in a multi-player game I think. Instead, loop through Actors of your Pawn class or something to start, and grab the 1st one that's not equal to the pawn you've already got possessed.

Later, you probably want to get the reference to the new pawn you want to posses via a mouse click on it or something.

I think you need to provide a ref to the current possessed pawn to un-possess it.

more ▼

answered Apr 02 '14 at 10:18 PM

avatar image

mikepurvis
2.5k 102 67 261

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Hi Alnadel,

I have a similar problem I am working on and I got a good answer from Epic. I just need to figure out arrays and test it, but I'm pretty sure it will work. Feel free to update the post if you can figure out how to store pawns in an array before I do.

https://answers.unrealengine.com/questions/50382/blueprint-pawn-switching.html#comment-51198-form

Hope it helps!

more ▼

answered Jun 04 '14 at 12:23 PM

avatar image

soulblighter
36 3 6 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

I maybe wrong on this but but here's my take on it (warning pseudo code)...

In the blueprint you have UnPosses(target = self). "self" in this case is the PlayerController, you don't want to UnPossess(a playercontroller) you want to UnPossess(a pawn). Not sure if this will fix your issue, you need to change your target to the Pawn currently possessed by the player controller..

It looks like you could just drag the blue wire from GetPlayerPawn() to UnPossess, not Possess. You need to possess some other Pawn when you press K, not PlayerPawn, as the "PlayerPawn" is the one that is already currently possessed.

Also, is the Player Index 1? I was under the impression the first player was player 0.

more ▼

answered Jun 22 '14 at 02:19 PM

avatar image

User-658380556
184 22 36 158

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question