Picking up item/obstacle/weapon Mr. Q style?

NED

Well-known member
Mr. Q 's way to Pick up item/obstacle/weapon seems very good
Finally a DD mode allows to pick up an obstacle

LotDD - Testing weapons!

How can I replicate a similar system ?
Thanks

EDIT : Finally, MrQ seems to use regular weapon system to replicate obstacle pickup. Consider this topic FIXED.
As a personnal explanation. I'll use a combination of that and obstacle.
Eg : barell obstacle will "break" on hit and spawn the barell weapon.
Obviously you cannot hit it again, but it's pickable.
 
You didn't answer my question before so I'm stabbing in dark here  :-\

Hmmm.... this is how I set up the obstacle:

Code:
name		Drum
health		1
type		npc
gfxshadow	1
speed		0
risetime	300
icon		data/chars/misc/drumicon.gif
diesound 	data/sounds/klunk.wav


anim idle
	delay	100
	offset	22 63
	bbox	0 -25 43 92
	platform 1 1 1 1 1 1 1 1
	frame	data/chars/misc/drum.gif

anim	walk
@script
	void self = getlocalvar("self"); //Get calling entity.

	changeentityproperty(self, "velocity", 0, 0);
        setidle(self, openborconstant("ANI_IDLE"));
@end_script
	delay	100
	offset	22 63
	bbox	0 -25 43 92
	platform 1 1 1 1 1 1 1 1
	frame	data/chars/misc/drum.gif

anim spawn
@script
    if(frame==1){
      void self = getlocalvar("self");

      changeentityproperty(self, "type", openborconstant("TYPE_OBSTACLE"));
    }
@end_script
	delay	10
	offset	22 63
	frame	data/chars/misc/drum.gif
	frame	data/chars/misc/drum.gif


anim pain
	delay	20
	offset	22 63
	bbox	0 -25 43 92
	frame	data/chars/misc/drum2.gif

anim fall
	delay	1000
	offset	23 63
	frame	data/chars/misc/drum2.gif

anim rise
	delay	20
	offset	22 63
	frame	data/chars/misc/drum.gif

Do you set your barrel in same way?
 
what question didn't I answer ?

This:

So nsw25, what exactly you mean by "not working"?

I don't understand if you meant 'not working' by unable to grab or you can grab it but it doesn't work the way you want it

For this:

your barrel set as npc would mean that it wont spawn normally (before player scrolls into the part of level) and wont be able to continue stage with barrel left behind ?

No. It can spawn normally. If it's removed before you get there, that means the problem is offscreenkill setting
And both NPC and obstacle won't stop player from progressing cause none of them are counted in group. In fact, it is grouping which is the real cause
BTW your barrel is set up as NPC too

also would mean enemies will attack it...

Set high stealth value such as stealth 350 to have enemies ignore it

So why don't you try copying script in SPAWN animation of my barrel example and paste it in your barrel's text like this:

anim spawn
@script
    if(frame==1){
      void self = getlocalvar("self");

      changeentityproperty(self, "type", openborconstant("TYPE_OBSTACLE"));
    }
@end_script
delay 5
offset 68 178
bbox 64 17 60 152
frame data/chars/misc/barrel/1.png
frame data/chars/misc/barrel/1.png
 
I knew it :)

To stop the barrel from walking around you can set speedf 0 and this script in its WALK animation:

Code:
anim	walk
@script
	void self = getlocalvar("self"); //Get calling entity.

	changeentityproperty(self, "velocity", 0, 0);
        setidle(self, openborconstant("ANI_IDLE"));
@end_script
...

And for flipped issue, you can just set facing command to force facing direction
 
That platform you mentioned that has 6 parameters (or 0's in your post; platform 0 0 0 0 0 0) is quite outdated. You should go with 8 instead of 6 because it's the most updated. Look at platform with 8 parameters (platform 1 1 1 1 1 1 1 1). Go with 8 0's just like you inserted 8 1's.

Have you looked up on my wall/platform example image I made? It has details I put in there.
 
I see both death and falldie in the character header but they have different death values, which is very odd. Both play the same, but you mistakenly added the 2 of them. You should at least have one of them in the header to avoid death values from conflicting each other when both of them are in it. Delete one of them in the header.
 
nsw, you need to set platform 1 1 1 1 1 1 1 1 in DEATH animation too
Setting platform 0 0 0 0 0 0 actually reverts platform setting to default aka activate it
 
Back
Top Bottom