View Issue Details

IDProjectCategoryView StatusLast Update
0009856New issuesScriptingpublic2018-07-06 14:37
ReporterGrafuAssigned Toqaisjp 
Status closedResolutionno change required 
Summary0009856: getElementColShape does not work

getElementColShape always returns false for player no matter he is outside any colshape or inside a colshape

Steps To Reproduce
  1. Go inside any colshape.
  2. crun getElementColShape(localPlayer) --returns false
  3. srun getElementsColShape(getRandomPlayer()) --returns false
TagsNo tags attached.



2018-05-16 10:04

viewer   ~~0026527

Wiki example seems to suggest this function is for getting the col shape of a marker rather than of a player.

The source only works for CClientMarker and CClientPickup

Perhaps the function should output a debug message if the input element type is not supported.


2018-05-16 10:08

viewer   ~~0026528

The getElementColShape function is not used to get what colshape a user is in, but get the colshape belonging to an element. Which is why it only works for pickups and markers, since these elements have colshapes of their own.

So this is the intended behaviour of this function. What you're looking to achieve can be done using the onColShapeHit and onColShapeLeave events.


2018-07-06 14:37

administrator   ~~0026635

I've tweaked the documentation. Thanks guys.

Issue History

Date Modified Username Field Change