How do I spawn an object and drag it

Get help using Construct 2

Post » Mon Mar 21, 2016 8:41 pm

I want to spawn a new object and drag it with the same touch (without need to touch the new object to drag it). Sorry my english.
B
4
S
2
Posts: 136
Reputation: 874

Post » Mon Mar 21, 2016 9:40 pm

Just one possible way

create an instance variable for your object
Image

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Mon Mar 21, 2016 9:52 pm

Thought about it while having a cigarette - and this is what I came up with

Image

  • System > On start of layout | system > load game from slot "brain"
  • System > On load failed | system > scroll to obj_Forum
B
17
S
8
G
5
Posts: 340
Reputation: 4,707

Post » Mon Mar 21, 2016 10:12 pm

Hi. Thank you, but I am using dragdrop behavior.

Sprite2 is spawned when the sprite1 is touched, but I've to touch it again to drag it.
B
4
S
2
Posts: 136
Reputation: 874

Post » Tue Mar 22, 2016 10:42 am

UP
B
4
S
2
Posts: 136
Reputation: 874

Post » Tue Mar 22, 2016 3:42 pm

nobody knows how?
B
4
S
2
Posts: 136
Reputation: 874

Post » Wed Mar 23, 2016 10:12 am

UP
B
4
S
2
Posts: 136
Reputation: 874

Post » Wed Mar 23, 2016 10:27 am

Try pinning the object right after you spawn it, and pin it to the first sprite
Zelda Gamekit (my project)



Example capxs:

Zelda-Style Inventory

Zelda Health

3-saveslot system

[url=https://www.dropbox.com/s/d4396pwak0oh7q6/ZeldaDialogueSystem.capx?dl=0]Zelda-like Dialogue[
B
52
S
24
G
30
Posts: 537
Reputation: 19,651


Return to How do I....?

Who is online

Users browsing this forum: Yahoo [Bot] and 15 guests