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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Incrementing Speed

hey guys, ive got to this point where i made a new function "increment Speed". basically i just want to increment speed of the paper sprite character when the player taps it. not sure how to link the new function in the event graph. alt text

Product Version: Not Selected
Tags:
speed.png (141.8 kB)
more ▼

asked Nov 07 '14 at 11:09 AM in Blueprint Scripting

avatar image

Mint92
12 10 14 14

avatar image Mint92 Nov 07 '14 at 12:19 PM

i have this so far alt text

but i cant connect an object to a component, plus when i test the game it, keeps displaying 2

alt text

speed2.png (201.3 kB)
speed3.png (63.7 kB)
(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

so basically i was over complicatialt textng this. ive deleted the increment function but left only the speed and score variables within the Gamemode class, and casted them variables within my character class.

speed4.png (139.1 kB)
more ▼

answered Nov 09 '14 at 12:05 AM

avatar image

Mint92
12 10 14 14

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

It will only increment the speed when you click the box however at the same time you destroy the actor which renders this kinda useless...

The variable speed is only available to that single object and not any other instance of it.

more ▼

answered Nov 08 '14 at 09:47 AM

avatar image

Erasio
5.9k 291 86 293

avatar image eXi Nov 08 '14 at 11:10 AM

The thing is, for me, i don't know when the Destroy Node nullifies everything and when not. Because it is all done in the same Frame. I mean, the Prints work for him, but the Speed Value isn't increased at all i guess. Shouldn't it be 7 if he clicks it?.. Or wait, what is the Start Value of Speed? If it's -3, than everything is ok :D

avatar image Mint92 Nov 08 '14 at 03:22 PM

not sure how to do this, basically just want the sprite to go faster gradually each time the player has clicked it or touched it so it becomes harder over time. ive tried doing it this way

alt text

and then in level blueprint, i cast to the fish to access the speed variable but it does nothing alt text

speed.png (88.7 kB)
speed2.png (72.6 kB)
avatar image Mint92 Nov 08 '14 at 03:39 PM

the fish speed is set to -5 of the z axis

avatar image Mint92 Nov 08 '14 at 03:43 PM

alt text

doesnt update at all

speed3.png (64.1 kB)
avatar image Erasio Nov 08 '14 at 03:56 PM

You are setting a static location rather than updating the old one.

I can't make Screenshots right now but basically you have to get the old location of your actor then add the movement as vector to it and set this as the new position.

I personally would do the speed update on the game mode BP.

Depending on how long the game was or how many actors you spawned so far set the new speed.

avatar image Mint92 Nov 08 '14 at 04:12 PM

Okay ive transferred the speed update in my game mode. for getting the old location and updating it as a vector, stick this in the fish class?

avatar image Erasio Nov 08 '14 at 09:59 PM

Yes exactly. Just update the location each tick.

avatar image Mint92 Nov 08 '14 at 07:10 PM

help @ZakParrish XD

(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