changeentityproperty "weapent" how to use?

EannaMagic

New member
awake.png
use this fun
Test switch weapon (success) The actor is correctly turned into a weapon model......

fun.png
use fun......
item gun success spawn(drop ground)......
get gun entity,
self set gun entity error......
error.png

I see the source code Parameter is pointer



but...
openbor entity
It's a pointer?

how correct use changeentityproperty "weapent"......
 
The weapon property is an integer value that refers to weapon index. Weapons are enumerated internally by order of definition in model text.

DC
 
The weapon property is an integer value that refers to weapon index. Weapons are enumerated internally by order of definition in model text.

DC
I know this,
What I am asking now is...
"weapent" That is,
the weapon entity...
If you use a script to switch weapons weapent is empty
Not drop ground
Pick up a weapon The entity of the weapon
will be assigned to weapent
I think now Create a weapon Take it Assign to weapent ......
 
I know how the pointers work - I wrote most of them. :)

It seems I misunderstood your question. However, now that I see what you want, it is very complicated to explain, especially through the language barrier. I wrote a full tutorial in the forum about handling weapons with script. I will try to find it for you.

DC

*Edit* - Here it is:

 
Last edited:
I know how the pointers work - I wrote most of them. :)

It seems I misunderstood your question. However, now that I see what you want, it is very complicated to explain, especially through the language barrier. I wrote a full tutorial in the forum about handling weapons with script. I will try to find it for you.

DC
Thank you~
do! Async.Sleep 100000000000000000000000.......
..................
...........
Solves the problem;)
 
I know how the pointers work - I wrote most of them. :)

It seems I misunderstood your question. However, now that I see what you want, it is very complicated to explain, especially through the language barrier. I wrote a full tutorial in the forum about handling weapons with script. I will try to find it for you.

DC

*Edit* - Here it is:

"weapon_item" == “weapent”?
i code must be correct......

changeentityproperty "weapent" .... Doesn't seem to work
 
I tried using "weapent" but i can't find a way that make it work so you can try using a variable that confirm that the entity have a gun and make conditions that when the entity is throwing away or being forced to drop it,the variable is forced to be empty and the gun will be spawned,you also gonna need to do a didhitscript to add variable for entity itself,if it's players you can check which player is getting the weapon and setting a exclusive variable for the player,if it's NPC/Enemy you can try using entity variables,i still haven't used it so i can't help on this case
 
I tried using "weapent" but i can't find a way that make it work so you can try using a variable that confirm that the entity have a gun and make conditions that when the entity is throwing away or being forced to drop it,the variable is forced to be empty and the gun will be spawned,you also gonna need to do a didhitscript to add variable for entity itself,if it's players you can check which player is getting the weapon and setting a exclusive variable for the player,if it's NPC/Enemy you can try using entity variables,i still haven't used it so i can't help on this case
to help friends
modify the completed game
used openbor default weapon system......

"weapent" have bug......
 
Back
Top Bottom