Input a video to play in game when objects collides?

Get help using Construct 2

Post » Mon Apr 20, 2015 3:49 am

Hi, I have read the manual, and following the instructions, I have input a video box, but have no idea how to actually put the REAL video into the video box... anyone?

I would like to trigger a video play when player and another object collides...

Anyone?? :'( kinda urgent ...

thank you in advance!!!
B
3
Posts: 8
Reputation: 193

Post » Mon Apr 20, 2015 7:34 am

The manual (https://www.scirra.com/manual/181/video) is very clear on this.

Just import the relevant format(s) as Project files into the Project window on the top right, then fill in the Video Object's propertiy options for the type of video imported in the property sheet on the bottom left.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
132
S
29
G
81
Posts: 5,328
Reputation: 56,655

Post » Mon Apr 20, 2015 9:51 am

hi, thanks for your kind reply:)

I eventually figured out that I need to fill in the video properties... haha
but, I still can't trigger the video play, do you have any experience using this plugin?

I kind of just set up an event to test it but no luck:

System: Keyboard Space is down
Video: move to top of layer
Video: Set Visible
Video: Play

when I previewed and tried, it still doesn't happen...
I tried exporting it and see if it works, still, doesn't work...

my video file is 8 MB, it's rendered into mp4, h.264 format, do you think it is the problem of my events... do you happen to have an idea? :(
Last edited by Lyylee on Mon Apr 20, 2015 10:22 am, edited 1 time in total.
B
3
Posts: 8
Reputation: 193

Post » Mon Apr 20, 2015 9:54 am

space is down is not a trigger - it's true every tick the spacebar is down and as such you probably start of the video a lot of times.

on key pressed - space would be better..

Not sure if that's the issue, just saying.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Mon Apr 20, 2015 10:28 am

hi, LittleStain... I have tried changing it to on key pressed... it still doesn't work...

ugh... this is frustrating......
B
3
Posts: 8
Reputation: 193

Post » Mon Apr 20, 2015 11:12 am

i tested in the same condition and that's work

with setting:
h264 : source.mp4 (with source.mp4 added in project file)
autoplay : preload
play on background : no
intial visibility : invisible
Image Image
B
22
S
13
G
130
Posts: 869
Reputation: 67,816

Post » Mon Apr 20, 2015 11:24 am

I think in order to help you quickly and more efficiently, you will need to either provide snapshots of your events or, more preferable, provide your current .capx.

You can save as a single file and post the link from - for instance Dropbox - here, but add a space after the http as you don't have enough rep to post links yet.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
132
S
29
G
81
Posts: 5,328
Reputation: 56,655

Post » Mon May 04, 2015 6:53 am

Guys, thank you so much! I forgot my password so I couldn't log in before to say thanks...
I have changed my strategy, as I followed the instructions and still it didn't work for me... but really thanks for trying to help!!!

But now I have encountered another problem... lol
I want to make my character play another animation when it is on collision with a tissue box, however, I can't make it work...

https ://www.dropbox.com/s/4f1jo0od0h96kv0/Problem.png?dl=0

I just want the player to pick up the tissue box when player and tissue box collides, and I have made an animation for it...

I know that there's more that I need to set in order to stop my player from moving when it hits the tissue box... but... I didn't succeed...

my idea is:
1. player collides w/ tissue box
2. player control (keypress function) become disabled
3. player plays the collect_box animation
4. after 2 sec, the tissue box is destroyed
5. collect_box animation finished playing
6. player control is enabled again

should I set up my own keys instead of using the default control?

I tried to add a bunch of events... but it didn't work and got so messy, so I deleted them all, and left the basic stuff on the picture in the drop box link...

would be very grateful if you guys can help... :'(
B
3
Posts: 8
Reputation: 193


Return to How do I....?

Who is online

Users browsing this forum: Syazanie Amirin and 12 guests