|
 |
|
|
|
|
|
GTA Modification Forums
Object detection conditional check
 |
|
 |
| |
Ashwin the new boy  |
Posted: Thursday, Apr 26 2012, 13:18
|
I am The Most Confused Person

Group: Members
Joined: Nov 14, 2010


|
| QUOTE | | the drivers and pilots are blind and stupid. So how to make them to become smart? |
It is very difficult, when you give them instruction to go somewhere they calculate & follow smallest path rote so, Add more paths to make them smart  the thing i am telling you is | QUOTE | | How to check is there is some building or other structure somewhere around the player |
| CODE | {$CLEO} thread 'Ashwin' wait 5000 model.Load(#COLT45) 038B: load_requested_models
:0 04C4: create_coordinate 1@ 2@ 3@ from_actor $3 offset 0.0 10.0 0.0 object.Create(0@, #COLT45, 1@, 2@, -100.0) object.CollisionDetection(0@, 0)
:1 04C4: create_coordinate 1@ 2@ 3@ from_actor $3 offset 0.0 10.0 0.0 01BC: put_object 0@ at 1@ 2@ -100.0 wait 0 01BB: store_object 0@ position_to 4@ 5@ 6@ if 0035: 6@ >= 3@ //<--- checking if object Z height is more than player Actor jf @1 // <--- If condition true then There is a building, tree, car, or any collision object at this place (1@ 2@ 3@) ---> // //<--- Give them instruction what to do now --->//
|
using this script, you will get that there is a object in front of it, i am interested to know what instruction you will give them now
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
DK22Pac  |
Posted: Thursday, Apr 26 2012, 18:51
|
Assembly!

Group: Members
Joined: Apr 12, 2009


|
| CODE | // store needed coords 04C4: create_coordinate 0@ 1@ 2@ from_actor $3 offset 0.0 0.0 10.0 04C4: create_coordinate 4@ 5@ 6@ from_actor $3 offset 0.0 0.0 2.0 // get pointers to these coords 05F8: 3@ = var 0@ offset 05F8: 7@ = var 4@ offset // check if there any collision between these points 05E2: call_function 0x4DA560 num_params 9 pop 9 0 0 0 1 1 1 1 7@ 3@ 8@ if 8@ == 0 then // there's some collision else // this space is free end | This post has been edited by DK22Pac on Thursday, Apr 26 2012, 19:07
|
|
|
|
|
 |
|
 |
 |
|
 |
| |
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
Track this topic
Receive email notification when a reply has been made to this topic and you are not active on the board.
Subscribe to this forum
Receive email notification when a new topic is posted in this forum and you are not active on the board.
Download / Print this Topic
Download this topic in different formats or view a printer friendly version.
| |
 |
|
 |
|
|
|
|