<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-9209160805269273736</id><updated>2024-11-01T03:38:49.453-07:00</updated><category term="Tutorial Java"/><category term="UDK"/><category term="t"/><category term="นอกเรื่อง"/><category term="สาระน่ารู้"/><title type='text'>UDKThailand</title><subtitle type='html'>UDK tutorial Thailand</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>35</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-4582947961237214651</id><published>2012-03-20T06:55:00.001-07:00</published><updated>2012-03-20T06:55:56.319-07:00</updated><title type='text'>UDKThai.blogspot.com &gt;&gt;&gt; UDKThai.com เร็วๆนี้ซื้อแล้ว จัดการ host อยู่จ้า</title><content type='html'>&lt;span id=&quot;fullpost&quot;&gt; 

&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/4582947961237214651/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/4582947961237214651?isPopup=true' title='1 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/4582947961237214651'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/4582947961237214651'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2012/03/udkthaiblogspotcom-udkthaicom-host.html' title='UDKThai.blogspot.com &gt;&gt;&gt; UDKThai.com เร็วๆนี้ซื้อแล้ว จัดการ host อยู่จ้า'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-1195852288025621778</id><published>2012-03-17T00:02:00.001-07:00</published><updated>2012-03-17T00:02:36.269-07:00</updated><title type='text'>กลับมาปัดฝุ่นเร็วๆนี้ อาจจะมีการเปลี่ยนรูปแบบใหม่จ่ะ</title><content type='html'>&lt;span id=&quot;fullpost&quot;&gt; 

&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/1195852288025621778/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/1195852288025621778?isPopup=true' title='2 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/1195852288025621778'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/1195852288025621778'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2012/03/blog-post.html' title='กลับมาปัดฝุ่นเร็วๆนี้ อาจจะมีการเปลี่ยนรูปแบบใหม่จ่ะ'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-1379211845878696506</id><published>2012-02-05T23:40:00.000-08:00</published><updated>2012-02-05T23:44:01.278-08:00</updated><title type='text'>Video Tutorial Camera</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Input&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;600&#39; height=&#39;400&#39; src=&#39;https://www.youtube.com/embed/caoc4EXqXYA?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Camera Isometric Lock Position&lt;/div&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;600&#39; height=&#39;400&#39; src=&#39;https://www.youtube.com/embed/v3Z4C1biqu4?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Camera TPS Zoom and smooth&lt;/div&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;600&#39; height=&#39;400&#39; src=&#39;https://www.youtube.com/embed/KPeym1FGUos?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
Camera TPS pototype Gears of war&lt;/div&gt;
&lt;object class=&quot;BLOGGER-youtube-video&quot; classid=&quot;clsid:D27CDB6E-AE6D-11cf-96B8-444553540000&quot; codebase=&quot;http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0&quot; data-thumbnail-src=&quot;http://i.ytimg.com/vi/YrIO9T99I_Q/0.jpg&quot; height=&quot;400&quot; width=&quot;600&quot;&gt;&lt;param name=&quot;movie&quot; value=&quot;http://www.youtube.com/v/YrIO9T99I_Q?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata&quot; /&gt;



&lt;param name=&quot;bgcolor&quot; value=&quot;#FFFFFF&quot; /&gt;



&lt;embed width=&quot;600&quot; height=&quot;400&quot;  src=&quot;http://www.youtube.com/v/YrIO9T99I_Q?version=3&amp;f=user_uploads&amp;c=google-webdrive-0&amp;app=youtube_gdata&quot; type=&quot;application/x-shockwave-flash&quot;&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span id=&quot;fullpost&quot;&gt; 

&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/1379211845878696506/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/1379211845878696506?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/1379211845878696506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/1379211845878696506'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2012/02/video-tutorial-camera.html' title='Video Tutorial Camera'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-7048795585608801884</id><published>2012-01-29T07:52:00.000-08:00</published><updated>2012-01-29T08:41:09.176-08:00</updated><title type='text'>Library Function</title><content type='html'>&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;b&gt;Actor Class&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange; font-size: large;&quot;&gt;&lt;b&gt;Spawn&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
เป็นการเชื่อมต่อ class ของ Object ที่ทาง UDK ได้ให้กำหนดไว้เช่น Pawn Camera Controller Navigation พูดง่ายๆ ตัวไหนที่มีตัวตนในเกมโดยมี buffer ไหลผ่านและเป็น class หลักๆ จะสามารถใช้ได้ อย่างอื่นไม่สามารถ จะใช้เชื่อมต่อได้&lt;br /&gt;
โดยมี&amp;nbsp;&lt;span style=&quot;color: #38761d;&quot;&gt;Parameter&lt;/span&gt;&amp;nbsp;ดังนี้&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;native noexport final function coerce&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://wiki.beyondunreal.com/UE3:Actor_(UDK)&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;UE3:Actor (UDK)&quot;&gt;Actor&lt;/a&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;b style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;Spawn&lt;/b&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;a class=&quot;mw-redirect&quot; href=&quot;http://wiki.beyondunreal.com/Class&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;Class&quot;&gt;class&lt;/a&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;a href=&quot;http://wiki.beyondunreal.com/UE3:Actor_(UDK)&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;UE3:Actor (UDK)&quot;&gt;Actor&lt;/a&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;SpawnClass&lt;/b&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;optional&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://wiki.beyondunreal.com/UE3:Actor_(UDK)&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;UE3:Actor (UDK)&quot;&gt;Actor&lt;/a&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;SpawnOwner&lt;/b&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;optional&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;mw-redirect&quot; href=&quot;http://wiki.beyondunreal.com/Name&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;Name&quot;&gt;name&lt;/a&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;SpawnTag&lt;/b&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;optional&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://wiki.beyondunreal.com/UE3:Object_structs_(UDK)#Vector&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;UE3:Object structs (UDK)&quot;&gt;Object.Vector&lt;/a&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;SpawnLocation&lt;/b&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;optional&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://wiki.beyondunreal.com/UE3:Object_structs_(UDK)#Rotator&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;UE3:Object structs (UDK)&quot;&gt;Object.Rotator&lt;/a&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;SpawnRotation&lt;/b&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;optional&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://wiki.beyondunreal.com/UE3:Actor_(UDK)&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;UE3:Actor (UDK)&quot;&gt;Actor&lt;/a&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;ActorTemplate&lt;/b&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;optional&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;mw-redirect&quot; href=&quot;http://wiki.beyondunreal.com/Bool&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;Bool&quot;&gt;bool&lt;/a&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;bNoCollisionFail&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-indent: -41px;&quot;&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red; font-size: xx-large;&quot;&gt;Worldinfo Class&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: red; font-size: xx-large;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;color: orange; font-size: large;&quot;&gt;&lt;b&gt;BroadCast&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b style=&quot;color: red; font-size: xx-large;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b style=&quot;color: red; font-size: xx-large;&quot;&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Coming Soon&lt;br /&gt;
&lt;br /&gt;
&lt;span id=&quot;fullpost&quot;&gt; 

&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/7048795585608801884/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/7048795585608801884?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/7048795585608801884'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/7048795585608801884'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2012/01/library-function.html' title='Library Function'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-181607694929207615</id><published>2012-01-29T07:35:00.001-08:00</published><updated>2012-01-29T08:41:22.790-08:00</updated><title type='text'>(เสริม) ส่วนประกอบใน Source Code UDK</title><content type='html'>โครงสร้างในการเขียน Source code UDK&lt;span id=&quot;fullpost&quot;&gt; 

&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Class จะเป็น ในส่วนของการควบคุม Function หรือ method หรือแม้แต่ Properties ก็ตาม&lt;/div&gt;
&lt;div&gt;
Function จะเป็นคำสั่งในส่วนต่างๆ&lt;/div&gt;
&lt;div&gt;
Properties จะทำให้ variable ที่เราตั้งไว้สามารถ กำหนด ค่าเริ่มต้นใน ที่นี้ได้&lt;br /&gt;
&lt;br /&gt;
ตัวอย่าง&lt;br /&gt;
&lt;br /&gt;
Class โรงเรียนอารามิ Extends ศูนย์กลางการเรียนรู้;&lt;br /&gt;
&lt;br /&gt;
var int ห้องเรียน&lt;br /&gt;
&lt;br /&gt;
function ห้องน้ำ(น้ำ,ไฟฟ้า,จำนวนห้อง)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;น้ำ = 50 ลิตร;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;ไฟฟ้า = 200 watt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;จำนวนห้อง = 10 ห้อง;&lt;br /&gt;
}&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;br /&gt;
Class และ Function จะได้ราวๆนี้&lt;br /&gt;
&lt;br /&gt;
ส่วน properties&lt;br /&gt;
&lt;br /&gt;
DefaultProperties&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; ห้องเรียน = 20&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
แสดงว่าโผล่มาเมื่อ class ถูกเรียกหรือดึงเข้าไปร่วมในการทำงาน ดังนั้น ห้องเรียน ที่มีค่าเริ่มต้น&lt;br /&gt;
&lt;br /&gt;
จะมี 20 เราสามารถ เพิ่มได้ภายหลัง ที่เราจะเขียนใน function หรือ + เพิ่มไปใน variable ได้&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/181607694929207615/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/181607694929207615?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/181607694929207615'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/181607694929207615'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2012/01/defaultproperties.html' title='(เสริม) ส่วนประกอบใน Source Code UDK'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-4101876373047813326</id><published>2012-01-19T06:13:00.001-08:00</published><updated>2012-01-29T07:40:15.142-08:00</updated><title type='text'>บทที่ 7.1 การยิงปืนโดย มีลูก กระสุน หรือ projectile เป็นตัวบ่งชี้</title><content type='html'>วันนี้ผมจะมา สอนสร้างเกม ครับ โดยเราจะมาเริ่มในบทที่ 7.1 เรื่องการยิง&lt;br /&gt;
&lt;br /&gt;
ก่อนอื่นให้เราสร้าง file มาหนึ่ง file ครับนั่นก็คือ เราจะตั้ง class projectile หรือลูกกระสุน&lt;br /&gt;
&lt;br /&gt;
คราวนี้ ให้เราตั้ง class เลยครับ&lt;br /&gt;
&lt;div id=&quot;fullpost&quot;&gt;
&lt;br /&gt;
class GunnerBProjectile extends UDKProjectile;&lt;br /&gt;
&lt;br /&gt;
Defaultproerties&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Begin Object Class=DynamicLightEnvironmentComponent Name=MyLightEnvironment&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;bEnabled=TRUE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; End Object&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Components.Add(MyLightEnvironment)&lt;br /&gt;
&amp;nbsp; &amp;nbsp; begin object class=StaticMeshComponent Name=kason_gunnerB&amp;nbsp;// สามารถเปลี่ยนได้ครับ ไม่ว่าจะเป็น particlesystemcomponent หรือ จะใช้ skeletal ก็ได้&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;StaticMesh=StaticMesh&#39;WP_BioRifle.Mesh.S_Bio_Blob_01&#39; // รูป model ที่จะเป็น ลูก กระสุน&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;LightEnvironment=MyLightEnvironment&lt;br /&gt;
&amp;nbsp; &amp;nbsp; end object&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Components.Add(kason_gunnerB)&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
คราวนี้เรามาเชื่อมต่อกับ อาวุธที่ จะใช้ยิงครับ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
เรามาเพิ่ม หนึ่ง function กัน&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;simulated event vector GetPhysicalFireStartLoc(optional vector AimDir)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; local SkeletalMeshComponent compo;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; local SkeletalMeshSocket socket;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; compo = SkeletalMeshComponent(Mesh);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; if (compo != none)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; {&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;        &lt;/span&gt;socket = compo.GetSocketByName(&#39;MussleFlashSocket&#39;);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;    }&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;    &lt;/span&gt;if (socket != none)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;    &lt;/span&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt; &amp;nbsp; &amp;nbsp;   return compo.GetBoneLocation(socket.BoneName);&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;    &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;ตัวนี้ ถ้าผมจำไม่ผิด น่าจะเป็น function ที่ช่วยในการบังคับให้ projectile ในการออก หรือพ่น ออกไปใน &lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;socket ที่ตั้งเอาไว้ ครับ&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;เปลี่ยนประเภท การยิง WeaponFireTypes(0)= ให้เป็น EWFT_Projectile&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;แล้วก็เพิ่มอีก 1 properties ก็คือ ข้างล่าง&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;WeaponProjectiles(0)=class&#39;MyGame.SandboxPaintballProjectile&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;OK หลังจากนั้น ก็ลองทดสอบ complie แล้วยิงดู &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;เดี๋ยวผม จะลง video การเขียนให้นะครับ โดยผ่านทาง Youtube Channel DevoursTV ครับ&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: #dbdbdb; color: #4a4a4a; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: #dbdbdb; color: #4a4a4a; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/4101876373047813326/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/4101876373047813326?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/4101876373047813326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/4101876373047813326'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2012/01/71-projectile.html' title='บทที่ 7.1 การยิงปืนโดย มีลูก กระสุน หรือ projectile เป็นตัวบ่งชี้'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-4089153979663116175</id><published>2012-01-19T06:11:00.000-08:00</published><updated>2012-01-19T06:11:32.297-08:00</updated><title type='text'></title><content type='html'>&lt;span style=&quot;background-color: white; color: #585858; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 26px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.tornbanner.com/&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #336699; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 26px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; vertical-align: baseline;&quot;&gt;Torn Banner Studios&lt;/a&gt;&lt;span style=&quot;background-color: white; color: #585858; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 26px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span id=&quot;fullpost&quot;&gt; 

&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #585858; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 26px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;620&#39; height=&#39;466&#39; src=&#39;https://www.youtube.com/embed/z5rYoxNbPzA?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; color: #585858; font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 26px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/4089153979663116175/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/4089153979663116175?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/4089153979663116175'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/4089153979663116175'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2012/01/torn-banner-studios.html' title=''/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-8113144284726129285</id><published>2012-01-17T04:35:00.000-08:00</published><updated>2012-01-17T04:35:03.457-08:00</updated><title type='text'>admin ลาพัก 2 วัน</title><content type='html'>เนื่องจาก ช่วยนี้ admin นอนดึกงาน มากไปหน่อย ทำให้ช่วงนี้เพียลๆ&amp;nbsp;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
รออีกสัก วัน พฤหัส จะมาลง บทความทำลูก กระสุนแล้ว ลง video ย้อนหลังไป บทแรกๆ ก่อนนะครับ&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;span id=&quot;fullpost&quot;&gt; 

&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/8113144284726129285/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/8113144284726129285?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8113144284726129285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8113144284726129285'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2012/01/admin-2.html' title='admin ลาพัก 2 วัน'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-8577532019616472620</id><published>2012-01-12T00:46:00.001-08:00</published><updated>2012-01-19T06:19:49.857-08:00</updated><title type='text'>บทที่ 7 ติด อาวุธ เตรียมยิง!!!!!</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjryrTQj6Yyf7lXX_Y2D4KCeKrdc0Ij93Fe_Xh9abdbGy7zLj0YsNXIC8A0bARv5XneLCnDdVrZQp2B_svo72UE_s9YCVYf5Cml8-VUAopSZt3SIQ_xkcPZZ2tmgA_Dt_86dxDydN6w4AC1/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjryrTQj6Yyf7lXX_Y2D4KCeKrdc0Ij93Fe_Xh9abdbGy7zLj0YsNXIC8A0bARv5XneLCnDdVrZQp2B_svo72UE_s9YCVYf5Cml8-VUAopSZt3SIQ_xkcPZZ2tmgA_Dt_86dxDydN6w4AC1/s400/1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
บทที่ 7 จะเป็นการสอน ติดอาวุธให้&lt;br /&gt;
ตัวละครไม่ว่าจะเป็น bot หรือ Player&lt;br /&gt;
ก็สามารถ ติดได้ตลอดจนแม้กระทั้ง&lt;br /&gt;
ตัวละครอะไรๆก็ตาม ในนี้ผมจะติด&lt;br /&gt;
การสอน video เข้าไปด้วยและ&lt;br /&gt;
สามารถ Download source code&lt;br /&gt;
ไปดูได้อีกด้วย&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div id=&quot;fullpost&quot;&gt;
&lt;b&gt;&lt;span style=&quot;color: red; font-size: x-large;&quot;&gt;VIDEO Tutorial

&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;620&#39; height=&#39;466&#39; src=&#39;https://www.youtube.com/embed/kVrlLV-08bw?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Download Source



&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;&lt;a href=&quot;http://www.mediafire.com/?v46fl2i7gyzb6ie&quot;&gt;Download&amp;nbsp;Now&lt;/a&gt;&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/8577532019616472620/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/8577532019616472620?isPopup=true' title='1 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8577532019616472620'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8577532019616472620'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2012/01/blog-post.html' title='บทที่ 7 ติด อาวุธ เตรียมยิง!!!!!'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjryrTQj6Yyf7lXX_Y2D4KCeKrdc0Ij93Fe_Xh9abdbGy7zLj0YsNXIC8A0bARv5XneLCnDdVrZQp2B_svo72UE_s9YCVYf5Cml8-VUAopSZt3SIQ_xkcPZZ2tmgA_Dt_86dxDydN6w4AC1/s72-c/1.png" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-8696549779443931285</id><published>2012-01-05T08:28:00.001-08:00</published><updated>2012-01-15T03:56:15.117-08:00</updated><title type='text'>First Project Game</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFlm3x_Rq7FAHsy461JKs5kPpFSx0O4tuA4pXLvsFBL39IpyFlr8cgO1-TecYLwnZOuxGL-Sx6AYcnz27_xjRqLY-KnfpHpFQGo13Q5nVQQoZv3hnzK995UL1udwNKKCfJh5ufzWsO9kA0/s1600/1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;169&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFlm3x_Rq7FAHsy461JKs5kPpFSx0O4tuA4pXLvsFBL39IpyFlr8cgO1-TecYLwnZOuxGL-Sx6AYcnz27_xjRqLY-KnfpHpFQGo13Q5nVQQoZv3hnzK995UL1udwNKKCfJh5ufzWsO9kA0/s320/1.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;color: red;&quot;&gt;Mini-Game Demo:&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
http://www.mediafire.com/?fhn8iehmf78tx98&lt;br /&gt;
http://www.mediafire.com/?4ytu6z5rxxrs5t4&lt;br /&gt;
http://www.mediafire.com/?0033hblgfl7nd08&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;Source Code:&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
http://www.mediafire.com/?ybcznvtkzmjdxld&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEP-ad6ZPtuET8LFRkxnvzc8uI2HKUA6ddcCqLt2hDbv5JzxAGOmgibHQs_uIpzqBwdCrD6hpzy5fPkDpVsDCt841Lhcvlf6ozzYVm9WoOaI4xhoXy8QDjK8ViK3JthwvixUJSq0FulNue/s1600/2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjEP-ad6ZPtuET8LFRkxnvzc8uI2HKUA6ddcCqLt2hDbv5JzxAGOmgibHQs_uIpzqBwdCrD6hpzy5fPkDpVsDCt841Lhcvlf6ozzYVm9WoOaI4xhoXy8QDjK8ViK3JthwvixUJSq0FulNue/s320/2.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
อธิบาย&lt;br /&gt;
&lt;br /&gt;
StartInfo.uc คือโผล่มาจะเป็น การเริ่มเกมครับ แต่ยังไม่ได้กดอะไรนะครับ ในนี้นี้จะสังเกตุว่าผม&lt;br /&gt;
&lt;br /&gt;
HUDType นี่เป็นการเรียก หรือเชื่อมต่อกับ HUD นะครับ โดยเชื่อต่อกับ Class StartGamePlay&lt;br /&gt;
เรามาดูใน StartGamePlay กัน&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div id=&quot;fullpost&quot;&gt;
simulated function PostBeginPlay() {&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;super.PostBeginPlay();&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;HudMovie = new class&#39;GFxStartGame&#39;;&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;HudMovie.SetTimingMode(TM_Real);&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;HudMovie.start();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ซึ่ง Method ที่ผมโชว์เป็นตัวเรียก นะครับ&lt;br /&gt;
&lt;br /&gt;
HudMovie = new class&#39;GFxStartGame&#39;; // new class คือการเชื่อมต่อกับ Object นะครับ&lt;br /&gt;
HudMovie.SetTimingMode(TM_Real); // ทำงาน method&amp;nbsp;SetTimingMode ใน Class GFxStartGame ซึ่ง&lt;br /&gt;
จริงแล้ว&amp;nbsp;SetTimingMode&amp;nbsp;ไม่มี ใน&amp;nbsp;GFxStartGame&amp;nbsp; หรอกครับแต่&amp;nbsp;GFxStartGame&amp;nbsp; มัน สืบทอดมาอีกที&lt;br /&gt;
HudMovie.start(); // เริ่มการทำงานครับ จะเห็นว่า&amp;nbsp;GFxStartGame มี parameter ทำไมไม่ใส่ จริงๆแล้วไม่ต้องใส่ครับ เพราะมันเป็นสิ่งที่บอกว่า จะใส่ก็ได้หรือไม่ใส่ก็ได้ optional ครับ&lt;br /&gt;
&lt;br /&gt;
เรามาดู&amp;nbsp;GFxStartGame กันดีกว่า&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
(ซัดดีคอนเจน สองเม็ด สมองรั่นป๋อแล้ว)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function StartGamePlay(){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Consolecommand(&quot;open Mario?Game=MyGame.TestGame&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
อ่าสังเกตุบรรทัดนี้ครับ&lt;br /&gt;
&lt;br /&gt;
ไปดู file flash ของผม จะตังเกตุว่า มันได้อ้างถึงชื่อ function นี้แสดงว่า ว่า Btm_play.onress เมื่อทำการ&lt;br /&gt;
กดลงไปนั่นเอง เมื่อทำการ กดลงไปให้ทำงานวิ่งมาหาใน UDK ครับแสดงว่าส่งค่าให้ script&lt;br /&gt;
&lt;br /&gt;
มาทำงานใน UDK แล้ว แสดงว่ามันสั่งให้มารันที่ function&amp;nbsp;StartGamePlay นั่นแหละ&lt;br /&gt;
เนื่องจาก ใน Object ตัวนี้สามารถใช้ ConsoleCommand ได้อ่า ผมก็ใช้ใน ส่วน command ในส่วนของ&lt;br /&gt;
&lt;br /&gt;
บทที่ 1 ได้เลยนิครับ open เปิด แผนที่ ชื่อว่า mario?Game=Folder.Class info ที่จะต้องการรันนะครับ&lt;br /&gt;
ก็จะได้เทคนิคในการเปลี่ยน map ในส่วนของบทที่ 6 ที่ผมได้สอนไปครับ&lt;br /&gt;
อ่ะคราวนี้เรามาดูในส่วนของ TestGame&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
เมื่อมันเรียก Class TestGame แล้วมันจะไปไหนต่อ มะเรามาดูกันตรงที่&lt;br /&gt;
&lt;br /&gt;
var int readyEndgame; ตัวนี้ดีกว่า ผมกำหนดใน Default ไว้ให้มันเป็น 0 นะครับ ให้เราลองเข้า&lt;br /&gt;
&lt;br /&gt;
CreaditEndgame ดูครับ สังเกตุ บรรทัด&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function Tick(float Time){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span style=&quot;background-color: red;&quot;&gt;if(TestGame(worldinfo.game).readyEndgame == 1){&lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;HudMovie = new class&#39;GFxEndgame&#39;;&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;HudMovie.SetTimingMode(TM_Real);&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;HudMovie.start();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
อ่า สังเกตุบรรทัดแดงๆครับ&amp;nbsp;&lt;span style=&quot;background-color: white;&quot;&gt;readyEndgame&amp;nbsp;== 1 จึงจะให้เข้าไปทำงาน HudMovie ครับ&lt;/span&gt;&lt;br /&gt;
สาเหตุ function Tick มันจะทวนทำงานตลอด ครับมันจะคอยเป็นหน้าที่ ดัก buffer ข้อมูลครับ&lt;br /&gt;
ไม่เชื่อว่ามันทำงานตลอดให้เลง ประกาศ log มันออกไปแล้วไปดู console log ครับแล้วท่านจะเห็น&lt;br /&gt;
เอง&lt;br /&gt;
&lt;br /&gt;
อ่าเรากลับมากันดีกว่า แล้วเราก็ไปต่อกันที่ MyPawn ดีกว่า&lt;br /&gt;
&lt;br /&gt;
เรามาดู ที่ function กล้องก่อนดีกว่า&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
simulated function bool CalcCamera(float fDeltaTime, out vector out_CamLoc, out rotator out_CamRot, out float out_FOV)&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;out_CamLoc = Location;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;out_CamLoc.X = -600;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;out_CamLoc.Z = 300;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;out_CamRot.roll = 0;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;out_CamRot.Pitch = 0;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;out_CamRot.Yaw = 0;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(mem == 0){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;mem = 1;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;savepoint_cam = out_camLoc;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(out_camLoc.Y &amp;gt;= savepoint_cam.Y){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;savepoint_cam.Y = out_camLoc.Y;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;else&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;out_camLoc.Y = savepoint_cam.Y;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
เนื่องจาก function นี้ได้รับ buffer ตลอดครับเลยทำให้ทำงานคอยตรวจสอบตลอดครับ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
โผล่มาผมก็ lock องศากล้องคงที่เลยครับ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
out_CamLoc = Location;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;out_CamLoc.X = -600;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;out_CamLoc.Z = 300;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;out_CamRot.roll = 0;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;out_CamRot.Pitch = 0;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;out_CamRot.Yaw = 0;&lt;br /&gt;
&lt;br /&gt;
เมื่อผมตั้งค่ากล้องอะไรเรียบร้อยแล้ว คือผมไม่อยากให้กล้องวิ่งกลับ&lt;br /&gt;
mem ตัวนี้ผมสร้างขึ้นมาเพื่อจดจำว่า จะให้&amp;nbsp;savepoint_cam&amp;nbsp;จำค่ากล้องครั้งแรกเมื่อทำการเข้าเกม&lt;br /&gt;
if(out_camLoc.Y &amp;gt;= savepoint_cam.Y){ ก็คือ ถ้า ตัวแปลที่ผม savepoint ตัวนี้ทำการวิ่ง ถ้า ตัวแปลของกล้องตัวจริงๆ นี่วิ่งผ่านไปมากกว่า&amp;nbsp;savepoint_cam.Y แนว Y ก็จะทำการ ให้&amp;nbsp;savepoint_cam.Y เนีย&lt;br /&gt;
จำว่า&amp;nbsp;savepoint_cam.Y มีค่าเท่าไหร่ แต่ถ้ามันน้อยกว่า ก็คือ&amp;nbsp;out_camLoc.Y จะมีค่าเท่ากับ&amp;nbsp;savepoint_cam.Y และมันจะไม่ทำให้กล้องวิ่งกลับไปตาม Player ครับ&lt;br /&gt;
&lt;br /&gt;
return true คือการยอมรับว่า เราจะใช้การตั้งค่าตัวนี้ครับ&lt;br /&gt;
&lt;br /&gt;
เรามาดู บรรทัด PostBeginPlay กันต่อดีกว่า&lt;br /&gt;
&lt;br /&gt;
var array&amp;lt;NavigationPoint&amp;gt; MonsterSpawnPoints;&lt;br /&gt;
&lt;br /&gt;
สิ่งแรกถ้าใครเข้า map ผมจะสังเกตุว่าเห้ย มีแอบเปิ้ลด้วย จริงๆแล้วมันชื่อว่า path node ครับไว้คอย&lt;br /&gt;
ทำหน้าที่ ที่ว่าหาจุดให้ Bot เกิดครับ&lt;br /&gt;
&lt;br /&gt;
ซึ่ง variable ข้างบนที่ผมตั้ง นั้นผมจะตั้งเป็น array ครับเนื่องจากว่า เพราะ pathnode มันมีแค่ ตัวแปลเดียว&lt;br /&gt;
แต่มันมีหลายๆ ตัวอยู่ในตัวแปลเดียว&lt;br /&gt;
&lt;br /&gt;
ผมก็เลย ใช้ Foreach&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
simulated function postBeginPlay(){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;local PathNode PS;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;super.PostBeginPlay();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;bCanDoubleJump=true;&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;foreach WorldInfo.AllNavigationPoints(class&#39;PathNode&#39;, PS)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;MonsterSpawnPoints.addItem(PS);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
AllNavigationPoints ก็ึิืคือหา class ที่เป็น NavigationPoints ที่มัน Extend มานั่นก็คือ PathNode ครับ&lt;br /&gt;
ยัดเข้าไปในตัวแปล PS ครับซึ่งผมได้สร้างไว้รอแล้ว&lt;br /&gt;
&lt;br /&gt;
โดยการนำ หน้าที่&amp;nbsp;MonsterSpawnPoints มารับ&lt;br /&gt;
&lt;br /&gt;
มันมี สองวิธีครับ โดยการใช้ i++ แต่ในที่นี้ ผมเลือกใช้ addItem เนื่องจากว่า มันสดวกและง่ายครับ&lt;br /&gt;
&lt;br /&gt;
และมันยังสามารถ เรียงลำดับ array ให้เหมือน การนั่งนับ array ต้นแบบได้อีกด้วย&lt;br /&gt;
&lt;br /&gt;
ข้อเสียคือ มันนับข้ามไม่ได้ครับ จะนับก็คือ 0-อินฟรี ไปเลยครับ&lt;br /&gt;
&lt;br /&gt;
ซึ่งนับมาเก็บไว้ ครับสามารถ ตรวจสอบ โดยการ for i++ ก็ได้ครับโดยการใช้วิธี บทที่ 1.2.1 ครับ&lt;br /&gt;
&lt;br /&gt;
ในที่นี้เราจะประกาศ ในรูปแบบ ของ log สามารถ ย้อนกลับไปดูใน content ใน Editor เลือก Tab scense ครับ&lt;br /&gt;
&lt;br /&gt;
แล้วจะสังเกตุว่า ตรงช่อง Actor ครับ ให้เลื่อนลงมาเลื่อยๆครับ จนกว่าจะเจอ Pathnode ที่ผมสร้างไว้ นั่นแสดงว่า สามารถ กดเข้าไปดูได้ด้วยนะครับ ว่า มันอยู่ ตำแหน่งตรงไหน ครับ&lt;br /&gt;
ส่วนถ้าจะสร้างใหม่ให้ท่านทำการ คลิกขวา แล้วเลือก Add actor จะเจอกับ Pathnode เอง&lt;br /&gt;
&lt;br /&gt;
อันนี้ คือ Basic สำหรับการ วางจุด ให้ การ Pawn ครับส่วน&lt;br /&gt;
&lt;br /&gt;
เมื่อได้จุดแล้ว&lt;br /&gt;
&lt;br /&gt;
มาดู Event Tick ครับ&lt;br /&gt;
&lt;br /&gt;
เรามาดูสองตัวอย่างกันดีกว่า&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if(bot == 0 &amp;amp;&amp;amp; vsize(MonsterSpawnPoints[1].location - location) &amp;lt; 560){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;bots = spawn(class&#39;BotController&#39;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;bots.pawn = spawn(class&#39;Snake&#39;,,,MonsterSpawnPoints[1].location,);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;bots.Possess(bots.pawn,false);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;bot++;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
เรามาทำความเข้าใจกับ Vsize กันก่อน vsize เป็นการ กำหนดระยะทาง vector ครับ สามารถ เอามาลบกัน&lt;br /&gt;
ทำให้เกิดผล การใกล้การ ไกลได้ ตัวนี้อย่าพึ่งสนใจ เรามาสนใจตรง&lt;br /&gt;
&lt;br /&gt;
bot == 0 นี่คือ bot ตัวที่ 1 ครับ ถ้า bot == 0 แน่นอนว่า ไม่ได้ตั้งค่า ให้มัน มันก็ 0อยู่แล้ว&lt;br /&gt;
ดังนั้น จะต้อง&amp;nbsp;vsize(MonsterSpawnPoints[1].location - location) &amp;lt;&amp;lt; หมายถึง ระยะทางของ point ที่ monster จะเกิด กับระยะทางที่ Player เดินเข้าไป จะต้อง &amp;lt; น้อยกว่า 560 ถึงจะเข้าไปทำการ&lt;br /&gt;
&lt;br /&gt;
เรียก bot ให้เกิด โดยจะต้องสร้างวิญญาณให้มันก่อน นั่นก็คือ Controller เอามารองรับ&lt;br /&gt;
พอได้วิญญาณ มันเสร็จ ให้ทำการ ตั้ง Pawn ในบรรทัด&lt;br /&gt;
&lt;br /&gt;
bots.pawn = spawn(class&#39;Snake&#39;,,,MonsterSpawnPoints[1].location,);
&lt;br /&gt;
&lt;br /&gt;
สังเกตุ&amp;nbsp;MonsterSpawnPoints[1].location อันนี้ผมกำหนด ตายตัวไว้เลย บอทตัวนี้จะต้องเกิด ใน pathnode array ที่ 1 ครับ ซึ่งใน pathnode array ที่หนึ่งที่โดนยัดมาเนีย จะไม่จำเป็นต้อง มีค่าตรงกับ ใน scene ครับ&lt;br /&gt;
เราจะรู้ด้วยการประกาศ log ออกมาแล้วไปเทียบใน Editor อีกที ถ้าเราเลือก ตำแหน่ง ใน scene&lt;br /&gt;
&lt;br /&gt;
ที่ pathnode_1 แต่ array ที่เรายัดมาดันไปอยู่ array ที่ 2-3 ก็มี ดังนั้นควรตรวจสอบก่อนจะเอาลงครับ&lt;br /&gt;
bots.Possess(bots.pawn,false); ก็ลองไปเปิดใน BotController ในส่วนนี้จะเป็นการทำงาน ในส่วนให้บอท&lt;br /&gt;
&lt;br /&gt;
ประมาณว่า ให้สิงค์ วิญญาณ ของ bot เข้ากับ ตัว บอทแล้วครับ แล้ว ก็ bot ++ ก็คือ ให้ ตัวแปร bot มีค่า&lt;br /&gt;
เท่ากับ 1 ครับนั่นก็หมายความว่า มันจะไป รอที่ ระยะทางของ Vsize อีกแล้ว อ่า&lt;br /&gt;
&lt;br /&gt;
จุดที่สองที่แตกต่างก็คือ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
bots.range = 300; // ระยะทาง&lt;br /&gt;
bots.pointera = MonsterSpawnPoints[0].location; // จุดกึ่งกลาง ที่จะต้องวิ่งกลับมา&lt;br /&gt;
&lt;br /&gt;
ในที่นี้ผมสร้างไว้ก็คือ วิ่ง ไปข้างหน้า 300 จุดกึ่งกลาง คือ&amp;nbsp;bots.pointera ตัวนี้ผมสร้างขึ้นโดยผมต้อง&lt;br /&gt;
การให้บอทรู้ ให้มันวิ่งกลับมา ข้างหลังไม่งั้น วิ่งทะลุหลัก หมื่นเป็นแน่ไม่ยอมวิ่งกลับ อิอิ&lt;br /&gt;
&lt;br /&gt;
โดย จะใช้ทั้งสอง ตัวนี้มาลบกันแล้วมาหา ค่าว่า มันมากกว่า Range ที่กำหนดไว้หรือไม่&lt;br /&gt;
&lt;br /&gt;
อ่าเรามาดูที่ Bot Controller กันดีกว่า&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Class BotController extends UDKBot;&lt;br /&gt;
&lt;br /&gt;
var Pawn MoveFollow;&lt;br /&gt;
var vector movenext;&lt;br /&gt;
var vector pointera;&lt;br /&gt;
var float range;&lt;br /&gt;
&lt;br /&gt;
simulated function PostBeginPlay()&lt;br /&gt;
{&lt;br /&gt;
local PathNode path; // ไม่เกี่ยว&lt;br /&gt;
local int i;// ไม่เกี่ยว&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
event Possess(Pawn iP,bool bV){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;super.Possess(iP,bV);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Pawn.setMovementPhysics();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(Pawn == Snake(Pawn)){ // ถ้าเป็น class Snake ให้เข้าไปทำงาน ข้างใน&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;movenext = Snake(Pawn).Location; // รับค่าพื้นที่ ที่จุด snake อยู่ จะรับแค่ครั้งเดียวเท่านั้น&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;gotostate(&#39;Snake&#39;); // วิ่งไป state ของ Snake&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(Pawn == turtle(Pawn)){ // ถ้าเป็น class turtle ถึงจะให้ไปทำงานข้างใน&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;movenext = turtle(Pawn).Location; // เหมือนข้างบนเลย&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;Pawn.GroundSpeed = 400; // กำหนดความเร็ว&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;gotostate(&#39;turtle&#39;); // วิ่งไป state ของ turtle&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(Pawn == flying(Pawn)){&amp;nbsp;// ไม่เกี่ยว&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//Pawn.bCanJump = true;&amp;nbsp;// ไม่เกี่ยว&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;//pawn.SetPhysics(PHYS_Falling);&amp;nbsp;// ไม่เกี่ยว&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&amp;nbsp;// ไม่เกี่ยว&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
state Snake{&lt;br /&gt;
begin:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;movenext.Y -= 20; // ให้วิ่ง ไปทาง ซ้าย ทีละ 20&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MoveTo(movenext,,0); // กำหนด function ในการวิ่ง&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;goto(&#39;begin&#39;); // วิ่งไปเลื่อยๆ ก็หมายถึง ให้กลับมา begin ต่อ&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
state turtle{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
begin:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;movenext.Y = pointera.Y - range; // เอาค่า จุดกึ่งกลาง มาลบ กับระยะทาง ก็จะได้ออกมา นี่ไปด้านซ้าย&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MoveTo(movenext,,0); // กำหนดให้ วิ่งโดยเอาค่าข้างบนมาใช้ จะวิ่งให้ถึงจุดก่อนถึงจะทำ งานบรรทัดต่อไปได้&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;movenext.Y = pointera.Y + range; // เหมือนด้านบน แต่อันนี้ไปด้านขวาแทน&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MoveTo(movenext,,0);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;goto(&#39;begin&#39;); // เริ่ม begin ใหม่อีกรอบ&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
event Tick(float Time){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(Pawn == flying(Pawn)){ // ตรวจสอบว่า เป็น class Flying หรือเปล่า&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if(Pawn.Location.Z &amp;lt;= -50){ // เมื่อ ตัวละคร ตกไปอยู่ ต่ำกว่า -50&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Pawn.JumpZ = 900; // ความแรงในการโดด&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Pawn.Velocity.Z = 1000; // แรงโน้มถ่วง Z ประมาณว่า ผลัก ขึ้นมา 1000&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
DefaultProperties{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
กลับมาที่ Pawn เรามาดู Do jump เป็นขั้นตอนสุดท้ายแล้ว&lt;br /&gt;
&lt;br /&gt;
นั่นก็หมายความว่า กระโดด เหยียบหัว ถึงจะเด้ง&lt;br /&gt;
&lt;br /&gt;
Dojump เป็นค่า Native อยู่แล้วจะไม่เหมือน Bot ซึ่ง bot สามารถ กำหนด แรงโน้มถ่วงได้เลย&lt;br /&gt;
&lt;br /&gt;
แต่ Player จะมีตัว Dojump เจ้าปัญหา คอยดักเวลากระโดดอยู่ ฉะนั้นเราจะต้องมาแก้ไขใน DoJump&lt;br /&gt;
&lt;br /&gt;
อีกรอบ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function bool DoJump( bool bUpdating )&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// This extra jump allows a jumping or dodging pawn to jump again mid-air&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// (via thrusters). The pawn must be within +/- DoubleJumpThreshold velocity units of the&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;// apex of the jump to do this special move.&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(MultiJumpRemaining &amp;gt; 1){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if ( PlayerController(Controller) != None )&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;PlayerController(Controller).bDoubleJump = true;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;DoDoubleJump(bUpdating);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;MultiJumpRemaining -= 1;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//*************** ตรงนี้ ผมไปดึงมาจาก UTPawn นั่นเป็นการกระโดด ธรรมดาๆ เฉยๆนะครับ *******//&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if ( Physics == PHYS_Spider )&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Velocity = JumpZ * Floor;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;else if ( Physics == PHYS_Ladder )&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Velocity.Z = 0;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;else if ( bIsWalking )&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Velocity.Z = Default.JumpZ;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;else&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;Velocity.Z = JumpZ;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;if (Base != None &amp;amp;&amp;amp; !Base.bWorldGeometry &amp;amp;&amp;amp; Base.Velocity.Z &amp;gt; 0.f)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;if ( (WorldInfo.WorldGravityZ != WorldInfo.DefaultGravityZ) &amp;amp;&amp;amp; (GetGravityZ() == WorldInfo.WorldGravityZ) )&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;Velocity.Z += Base.Velocity.Z * sqrt(GetGravityZ()/WorldInfo.DefaultGravityZ);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;else&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt;Velocity.Z += Base.Velocity.Z;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;   &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;SetPhysics(PHYS_Falling);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;bReadyToDoubleJump = true;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return true;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}else{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;super.DoJump(bUpdating);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return true;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
เราไปดู class Input&lt;br /&gt;
&lt;br /&gt;
ซึ่งใน Class Input นั้นที่ผมเขียน จะเน้นเป็นการ ตรวจสอบพื้นที่ ในการขยับมากกว่า&lt;br /&gt;
&lt;br /&gt;
คือถ้าวิ่งต่ำกว่าที่กำหนด คือจะวิ่งถอยหลังไม่ได้แล้ว&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/8696549779443931285/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/8696549779443931285?isPopup=true' title='1 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8696549779443931285'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8696549779443931285'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2012/01/first-project-game.html' title='First Project Game'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhFlm3x_Rq7FAHsy461JKs5kPpFSx0O4tuA4pXLvsFBL39IpyFlr8cgO1-TecYLwnZOuxGL-Sx6AYcnz27_xjRqLY-KnfpHpFQGo13Q5nVQQoZv3hnzK995UL1udwNKKCfJh5ufzWsO9kA0/s72-c/1.PNG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-7537392642674703460</id><published>2012-01-04T10:35:00.000-08:00</published><updated>2012-01-04T10:36:15.300-08:00</updated><title type='text'>( นอกเรื่อง ) Books For Unreal Development Kit</title><content type='html'>&lt;br /&gt;
&lt;iframe frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=ud09d-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=0672329921&amp;amp;ref=tf_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;&lt;/iframe&gt;
&lt;iframe frameborder=&quot;0&quot; marginheight=&quot;0&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=ud09d-20&amp;amp;o=1&amp;amp;p=8&amp;amp;l=as1&amp;amp;asins=0672329913&amp;amp;ref=tf_til&amp;amp;fc1=000000&amp;amp;IS2=1&amp;amp;lt1=_blank&amp;amp;m=amazon&amp;amp;lc1=0000FF&amp;amp;bc1=000000&amp;amp;bg1=FFFFFF&amp;amp;f=ifr&quot; style=&quot;height: 240px; width: 120px;&quot;&gt;&lt;/iframe&gt;
&lt;iframe src=&quot;http://rcm.amazon.com/e/cm?t=ud09d-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=1568814593&amp;ref=tf_til&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr&quot; style=&quot;width:120px;height:240px;&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;iframe src=&quot;http://rcm.amazon.com/e/cm?t=ud09d-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=1849690529&amp;ref=tf_til&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr&quot; style=&quot;width:120px;height:240px;&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;iframe src=&quot;http://rcm.amazon.com/e/cm?t=ud09d-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=1849691924&amp;ref=tf_til&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr&quot; style=&quot;width:120px;height:240px;&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;

&lt;span id=&quot;fullpost&quot;&gt; 
&lt;iframe src=&quot;http://rcm.amazon.com/e/cm?t=ud09d-20&amp;o=1&amp;p=8&amp;l=as1&amp;asins=0672326922&amp;ref=tf_til&amp;fc1=000000&amp;IS2=1&amp;lt1=_blank&amp;m=amazon&amp;lc1=0000FF&amp;bc1=000000&amp;bg1=FFFFFF&amp;f=ifr&quot; style=&quot;width:120px;height:240px;&quot; scrolling=&quot;no&quot; marginwidth=&quot;0&quot; marginheight=&quot;0&quot; frameborder=&quot;0&quot;&gt;&lt;/iframe&gt;
&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/7537392642674703460/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/7537392642674703460?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/7537392642674703460'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/7537392642674703460'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2012/01/books-for-unreal-development-kit.html' title='( นอกเรื่อง ) Books For Unreal Development Kit'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-4497766378973413656</id><published>2012-01-01T20:24:00.000-08:00</published><updated>2013-11-02T03:53:28.247-07:00</updated><title type='text'>บทที่ 6 Scale Form</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;iframe border=&quot;0&quot; frameborder=&quot;0&quot; height=&quot;60&quot; marginwidth=&quot;0&quot; scrolling=&quot;no&quot; src=&quot;http://rcm.amazon.com/e/cm?t=ud09d-20&amp;amp;o=1&amp;amp;p=26&amp;amp;l=ur1&amp;amp;category=books&amp;amp;banner=0CNP4ACE3RGVNH07AE02&amp;amp;f=ifr&quot; style=&quot;border: none;&quot; width=&quot;468&quot;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;b style=&quot;text-align: left;&quot;&gt;&lt;br /&gt;&lt;/b&gt;


&lt;b style=&quot;text-align: left;&quot;&gt;Scale Form&lt;/b&gt;&lt;span style=&quot;text-align: center;&quot;&gt;
เนื่องจาก UDK ได้ลบ UIScense ไปจึงทำให้ผมนั้นสร้าง GUI ของเกมไม่ได้&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
ก็เลยจำเป็นต้องมาพึ่งพา flash สามารถ&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
Download ตัวทดลองไปใช้ได้ครับ ที่นี่&lt;/div&gt;
&lt;a href=&quot;http://www.adobe.com/cfusion/tdrc/index.cfm?product=flash&quot;&gt;Download&lt;/a&gt;&amp;nbsp;อ่าเมื่อ Download มาติดตั้งแล้วเรียบร้อย ( สาเหตุทำไมผมถึงไม่ใช้ UDK ทำเนื่องจากว่า UIScense ถูกตัดออกไป ถ้ายังดึงดันที่จะทำ จะใช้เวลานาน และ ดวงที่จะออกมาไม่สวยเลยมีสูง ผมก็จึงตัดปัญหาไป ครับ ) ซึ่งถ้าใครมี CS3 - 5 ก็สามารถ มาทำได้ครับ ซึ่งในที่นี้ผมจะสอนการ ใช้งาน flash เบื้องต้นด้วย เอาละเริ่มมาเริ่มจาก การทำหน้าตา GUI กันก่อนดีกว่าครับ&lt;br /&gt;
&lt;div id=&quot;fullpost&quot;&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
หลังจากจำเจ ในรูปแบบการนำเสนอเดิมๆผมได้เปลี่ยน รูปแบบใหม่ให้ดูสวยขึ้น&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
ยังไงก็ช่วยกัน vote ด้วยนะครับ ว่าอ่านเข้าใจหรือไม่&lt;/div&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqFFsdskpZTvLkHRJX8Vz6oxyR2yLLPeS4QU6bStBBJmBcnqyVDWED5GZ2O6sUw6QTm7oH8PTZOU4WD2Qhti0RMQYQ6XVrg-bGzp_3dPFjlhaZRWpvF6vyiLouXp8GG6M-CrscjbnKQa5w/s1600/MM.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqFFsdskpZTvLkHRJX8Vz6oxyR2yLLPeS4QU6bStBBJmBcnqyVDWED5GZ2O6sUw6QTm7oH8PTZOU4WD2Qhti0RMQYQ6XVrg-bGzp_3dPFjlhaZRWpvF6vyiLouXp8GG6M-CrscjbnKQa5w/s1600/MM.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;b&gt;Installing&lt;/b&gt;&lt;br /&gt;
ก่อนอื่นก็เข้าไปที่ Adobe Extension Manager CS5 กด Install แล้วก็ไปที่ Folder UDK ของเรานะครับ เข้าไปที่ Binaries\GFx\CLIK Tools แล้วจะเห็นไฟล์&amp;nbsp;Scaleform CLIK ให้กดเลือกแล้วกด ตกลงครับ จากนั้นเมื่อทำเสร็จแล้ว
&lt;br /&gt;
ให้ทำการเข้า Flash Pro เลยครับ&lt;br /&gt;
หลังจากนั้นก็ทำการ กด Edit ตรง Title Bar ครับเมื่อคุณทำการกดแล้ว&lt;br /&gt;
ให้คุณ สังเกตุ Category นะครับให้เลือกคำว่า Actionscript แล้วจะสังเกตุมีปุ่มให้เลือก ว่า Language ถ้ามี actionscript 2 ให้เลือก actionscript 2 นะครับ เลือกเลยครับ actionscript 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmU0wt_WCbDzkbkT2_Lso6huDKW3vppzcZGM8qiFFGGvT3N6AoHo_6gGLvL2Drh6IlDL1XMcitMkv41xBGU-rLTrJft_psrDNjKpL5UWEIegDU7dXvY__B1v7-eKrY20xgezEblnuAxxyA/s1600/Open.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;301&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjmU0wt_WCbDzkbkT2_Lso6huDKW3vppzcZGM8qiFFGGvT3N6AoHo_6gGLvL2Drh6IlDL1XMcitMkv41xBGU-rLTrJft_psrDNjKpL5UWEIegDU7dXvY__B1v7-eKrY20xgezEblnuAxxyA/s400/Open.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
หลังจาก ทำการกดแล้ว Folder ในภาพที่ สามแล้ว ก็จะมีให้เลือกอะไรก็ไม่รู้ไม่ต้องสนใจ ตรงเข้าไปหา Folder UDK คุณ เข้าไป Folder Development เข้าที่ Flash ในที่นี้ผมบอกวิธีการใช้ AS2 ผมก็กด AS2 ครั้งนึง จะมี CLIK โผล่มา เลือกเลยครับ CLIK เลือกแล้วทำการ กด OK แล้วก็ กด OK อีกรอบนึง เพื่อเป็นการยืนยันครับ หลังจากนั้น ไปที่ Title Bar อีกรอบ เลือกคำว่า Window แล้วไปที่&lt;br /&gt;
Other Panel ครับ เลือกคำว่า Scaleform Launcher ครับกด มันลงไป&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMBLOYq4keCQs3g_m_hrF5LrVtaQodX4SMM5XAZ8BETJnhCvQKEv2snkt1dDJreKnZ0H5Iq-6Fw79eUEp6YC2ne-rm7lN0UmXNhOHzrbWRzGlYdd1Pp0pFP5VwmJJ2hQRdulgh9iYXhkCs/s1600/plusbut.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;273&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhMBLOYq4keCQs3g_m_hrF5LrVtaQodX4SMM5XAZ8BETJnhCvQKEv2snkt1dDJreKnZ0H5Iq-6Fw79eUEp6YC2ne-rm7lN0UmXNhOHzrbWRzGlYdd1Pp0pFP5VwmJJ2hQRdulgh9iYXhkCs/s400/plusbut.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
นี่คือตัวทดสอบนะครับ&lt;br /&gt;
ก็จะได้หน้าตาแบบนี้มา กด + ครับให้จังเกตุตรง Player Exe กด + บรรทัดนั้นครับยังไม่ต้องไปทำอะไรมันมากครับ คราวนี้กลับมาที่ Folder UDK ครับ เลือก&amp;nbsp;Binaries\GFx แล้วจะสังเกตุว่าจะมีไฟล์ที่ชื่อว่า&amp;nbsp;FxMediaPlayer แล้วมันจะมีให้ตั้งชื่อ Player name ตั้งเลยครับ แล้วกด Ok&lt;br /&gt;
แล้ว ก็ กด OK ซ้ำไปอีกรอบครับ&lt;br /&gt;
ก็จะได้มา แค่นี้แหล่ะครับ กด็จะได้&lt;br /&gt;
ตัวทดสอบมาแล้วเรามาต่อ การทำงานต่อดีกว่า&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6Bt_1uU2nZvXNDVKpEvpkzEIf_RczuZfJJUwxFucE3B4yoSJRRTGBRGXjxMO6BdEdWCE4LnPibHNcCtoMgeYcRGFvH8AsYe5pDjbRqRoZn9718OfcZVzU1UMiBlkvpGoabnIlxF-a9aeE/s1600/AS2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em; text-align: center;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;272&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6Bt_1uU2nZvXNDVKpEvpkzEIf_RczuZfJJUwxFucE3B4yoSJRRTGBRGXjxMO6BdEdWCE4LnPibHNcCtoMgeYcRGFvH8AsYe5pDjbRqRoZn9718OfcZVzU1UMiBlkvpGoabnIlxF-a9aeE/s400/AS2.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;b&gt;Working&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
เรามาเริ่มทำการสร้างก่อนดีกว่า&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
ในที่นี้ผมจะเลือกใช้ Actionscript 2.0 นะครับกดมันเข้าไป หลังจากนั้น&lt;br /&gt;
ทำการ สร้างเลยครับ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJtamtvR6vBHnEYne0q5FSWJdpno-kQ4pFQLHUilutd-0tTdzWbe3Np1-gliJNE3kUajATdQG6FYzgaiOCKIljxE1-80nOC-vMMe25sxE5-KmROK1fYET-0Vrp4Ny_dIIl9aLx07xMV8JR/s1600/setting.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiJtamtvR6vBHnEYne0q5FSWJdpno-kQ4pFQLHUilutd-0tTdzWbe3Np1-gliJNE3kUajATdQG6FYzgaiOCKIljxE1-80nOC-vMMe25sxE5-KmROK1fYET-0Vrp4Ny_dIIl9aLx07xMV8JR/s400/setting.PNG&quot; width=&quot;203&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
หลังจากนั้นให้ทำการ Edit เพื่อเลือกเพื่อนที่ครับ&lt;br /&gt;
สำหรับผมแล้วจะเลือก มาทดลอง ประมาณ 1024 x 720&lt;br /&gt;
ก่อนนะครับเพื่อเราเอามาทดสอบ&lt;br /&gt;
&lt;br /&gt;
หลังจากนั้นผมจะทำการ เลือก Tool bar ให้เลือก&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgisg9XBxKdD1SN5ykeTxhD0lWqJut7-OrTRWdvAkvUJ9ORISZEpcikhUVXr5ENC4eGsO3HSbuLh2Z_xCaPSUqUulDcXVnBTWIWE5La9lIycujsaZb8HCvADuxVyNPDIKyCwCvJIBn67Snp/s1600/CAC.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgisg9XBxKdD1SN5ykeTxhD0lWqJut7-OrTRWdvAkvUJ9ORISZEpcikhUVXr5ENC4eGsO3HSbuLh2Z_xCaPSUqUulDcXVnBTWIWE5La9lIycujsaZb8HCvADuxVyNPDIKyCwCvJIBn67Snp/s1600/CAC.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Icon ดังต่อไปนี้รูปนี้ครับ เมื่อ ผมเลือกแล้ว ผมก็เลือกสีดำ นะครับแล้วก็ ลากคลุมเพื่อนที่ทั้งหมด&lt;br /&gt;
เพื่อสร้างเป็น BG ครับตรงนี้คุณสามารถ คิดเองทำเองได้นะครับ&lt;br /&gt;
หลังจากนั้นให้ คุณลาก พื้นหลังที่คุณตกแต่งไว้ไปยัง Library ครับ&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizI49scMc6yAqvb0PJWr_INlzgPTiEamMdlG9uAOrsJ-IcfLH_w9Z3qfiVN61yT3_YzuhQgqMHICfxwtZVmg0Od-FaqKpK_HhXyICjG6LcJAXMswshbkXyTOSz-cCwweCjnO5fhKAiXOtm/s1600/TABB.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizI49scMc6yAqvb0PJWr_INlzgPTiEamMdlG9uAOrsJ-IcfLH_w9Z3qfiVN61yT3_YzuhQgqMHICfxwtZVmg0Od-FaqKpK_HhXyICjG6LcJAXMswshbkXyTOSz-cCwweCjnO5fhKAiXOtm/s400/TABB.PNG&quot; width=&quot;191&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
หลังจากนั้นนะครับ ผมก็ทำการลากดึง ตกแต่งอะไรบ้างแล้ว&lt;br /&gt;
ผมก็ เอามาวางไว้นะครับ เวลาลากวาง มันจะมาให้เลือก ตั้งชื่อ&lt;br /&gt;
แล้วจะมี select item ให้เลือก คุณเลือกเป็น Movie clip นะครับ&lt;br /&gt;
เพราะว่า มันจะง่ายต่อการเขียน เดี๋ยวส่วน button เดี๋ยวเรามาเริ่ม&lt;br /&gt;
กันต่อ อีกครับนะครับ หลังจากนั้น ผมว่า เราควรจะมาสร้าง mouse กันก่อนนะครับ&lt;br /&gt;
&lt;br /&gt;
เนื่องจากเป็นส่วนประกอบที่ ขาดไม่ได้เลยทีเดียว&lt;br /&gt;
&lt;br /&gt;
มาเรามาสร้างกัน ให้เราใช้ไอรูปเหลี่ยมๆ ที่ผม แนะนำให้สร้างเป็นพื้นในขั้นต้นนะครับ จริงๆมันชื่อ Rectangle Tool นะครับ Key ลัด กด R เพื่อ&lt;br /&gt;
ความเร็วในการใช้งาน&lt;br /&gt;
&lt;br /&gt;
อ่ามาเลือกกันดีกว่า กดมันลงไปคับ แล้วสร้างนอก กรอบนะครับอย่า&lt;br /&gt;
&lt;br /&gt;
สร้างในพื้นที่ BG ของเรานะครับ เลือกมันไปวางเป็น movie clip ก่อนนะครับ &amp;nbsp;หรือใครจะสร้าง mouse เองเลือกเอาเลยครับ&lt;br /&gt;
&lt;br /&gt;
สำหรับผมก็สร้างเป็นรุปแบบนี้อิอิ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Mouse Cursor&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6hxDCNMC5fQnJlkon8uGMfE9GuYiLevW3WKpfiygJYCqzKFSl__rIKT1ZSfQfVRdf7i5aRe0-sxiuw2Qh2uWHefHM4IkrDB7CkoibeOoKLgY1Ur9O2fKI-uBLUq5z1kFDzmlSsFVAk23p/s1600/cursor.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6hxDCNMC5fQnJlkon8uGMfE9GuYiLevW3WKpfiygJYCqzKFSl__rIKT1ZSfQfVRdf7i5aRe0-sxiuw2Qh2uWHefHM4IkrDB7CkoibeOoKLgY1Ur9O2fKI-uBLUq5z1kFDzmlSsFVAk23p/s1600/cursor.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
อ่า จะได้รูปแบบ ผมก็เอาไปทำเป็น movie clip แล้วหลังจากทำแล้วให้กดมัน&lt;br /&gt;
เป็นกรอบ สีน้ำเงินแบบนี้ครับ เพื่อเราจะไปกด F9 จะได้ เขียน actionscript กัน&lt;br /&gt;
&lt;br /&gt;
ให้คุณเอา Code นี้ไปใส่ นะครับ&lt;br /&gt;
แต่เดี่ยวก่อน mouse คุณควรจะสร้าง Layer ไว้ใน Layer ท้ายๆนะครับ เพระว่า&lt;br /&gt;
Layer ต้นๆ จะทำให้ Button นั้นทับ Cursor จนทำให้ มองไม่เห็น Mouse นั่นเอง&lt;br /&gt;
หลังจากนี้เรามาใส่ code กัน&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
onClipEvent(enterFrame)&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;_x=_root._xmouse;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;_y=_root._ymouse;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
มันจะหมายถึง การให้ mouse ควบคุม แกน X Y หน้าจอได้โดย parameter ให้เฟรมแต่ละเฟรม เข้าไปทำงานเปลี่ยน ครับ&lt;br /&gt;
&lt;br /&gt;
หลังจากนั้นให้ทำการ Save ครับ Save เลยครับ Save ไว้ใน UDKGame &amp;gt; Flash &amp;gt; ตั้งชื่อ folder คุณแล้วเอาเข้าไปไว้เลยครับ&lt;br /&gt;
&lt;br /&gt;
หลังจากนั้น กลับไปอ่านข้างบนครับ ซึ่งผมทำการบอกว่า นั่นมันคือ ตัวทดสอบ อ่า ทำการเปิดขึ้น&lt;br /&gt;
มาแล้วทำการ กดทดสอบครับ&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4LExzyZqf5BD0Q82pqb8q3E3ZkJnnJbJmHAtGc3Tggt3FusS9-64ovUwpMVasNVXlLBbxCaz60tQCxFjuX1rn5Dbmdgza8lrSvdDC2EJJhzTnU6T7u-g0TWPFHlZtwcjRk1EmG1tXhLoL/s1600/CCCCC.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4LExzyZqf5BD0Q82pqb8q3E3ZkJnnJbJmHAtGc3Tggt3FusS9-64ovUwpMVasNVXlLBbxCaz60tQCxFjuX1rn5Dbmdgza8lrSvdDC2EJJhzTnU6T7u-g0TWPFHlZtwcjRk1EmG1tXhLoL/s1600/CCCCC.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
เมื่อทำการ กดแล้วคุณจะได้&lt;br /&gt;
เห็นดั่งภาพที่ผมกำลังจะเอาขึ้นแสดงให้คุณดู&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWQnUaAJfDgP31tm9M7VyOmfEd3sXtXTiNRzcnvv7I7oEJ7qmV00D6NVSE7veQwBedYgiU7vfThWj_SUSqdq6wFjS7RHn0EhN8CFeHvf08MAEUOzlSYclH-dpgR3DbZpNZ91ZqoTgrMEuj/s1600/BAA.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;283&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiWQnUaAJfDgP31tm9M7VyOmfEd3sXtXTiNRzcnvv7I7oEJ7qmV00D6NVSE7veQwBedYgiU7vfThWj_SUSqdq6wFjS7RHn0EhN8CFeHvf08MAEUOzlSYclH-dpgR3DbZpNZ91ZqoTgrMEuj/s400/BAA.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
เอาแล้ว มันขยับตามแล้ว&lt;br /&gt;
ต่อไปเราจะมาสร้าง Button กันดีกว่า&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Button&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;
มาเรามาสร้าง button กันเถอะโอ้วจะเที่ยงคืนแล้ว ผมจะใช้ rectangle นะครับในการสร้าง button&lt;br /&gt;
ผมก็สร้าง Layer อีกชั้นขึ้นมาครับเพื่อที่จะมาทับ พื้นหลังครับไม่งั้นถ้าไม่สร้างโดนพื้นหลังทับแน่ๆ&lt;br /&gt;
หลังจากที่ผมสร้างเสร็จแล้วผมก็กระทำการลากไปวางที่ Library อีกทีครับ แล้วก็ทำการเลือกจาก Movie เป็น Button นะครับ&lt;br /&gt;
&lt;br /&gt;
อ่าเรา หลังจากนั้น ให้เราลบ อันเดิมออกไปก่อนแล้ว เราก็ดึงจาก Library มันครับ ชักมันมาลงมาครับ&lt;br /&gt;
แล้ว double click เข้าไปที่ ปุ่มตัวนั้นครับทำการสร้าง Text Layer จัดอะไรให้เรียบร้อยครับ ใน Layer ที่&lt;br /&gt;
สองผมแนะนำให้เป็น Text ครับ ใน Tab Timeline คุณจะ KeyFrame จะมีสี่ช่องครับ&lt;br /&gt;
&lt;br /&gt;
Up , Over , Down , Hit ครับ&lt;br /&gt;
&lt;br /&gt;
Up หมายถึง มันยังไม่ได้ทำอะไรเลย ว่างๆครับ&lt;br /&gt;
Over หมายถึง เมื่อเอาเมาส์ เข้าไปวางครับ&lt;br /&gt;
Down หมายถึง ทำการ กดลงครับ&lt;br /&gt;
Hit หมายถึง ปล่อย ครับ&lt;br /&gt;
&lt;br /&gt;
คลิก ขวา ที่ช่องเหล่านั้น&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMNkmKdDklIfHPI93bgoKSM54whMB0YS3nMPJ4jjCXdo0iQ0jxpQ11GtIm6fHNVzrZuN1EfBmIEB8Tk2C1ji6VmrNwd7TPoBqU_Z56iZReb80KQgLI8zTv8ELyvjpUuCcVzEyXrexwiwlD/s1600/Testb.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMNkmKdDklIfHPI93bgoKSM54whMB0YS3nMPJ4jjCXdo0iQ0jxpQ11GtIm6fHNVzrZuN1EfBmIEB8Tk2C1ji6VmrNwd7TPoBqU_Z56iZReb80KQgLI8zTv8ELyvjpUuCcVzEyXrexwiwlD/s400/Testb.PNG&quot; width=&quot;391&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
เรามาเริ่มกันต่อ จะสังเกตุ สามตัวที่&lt;br /&gt;
ผมวงกลมมันไว้ ลองไปเล่นกันดูครับ&lt;br /&gt;
ซึ่งผมจะอธิบายเกิ่นไว้ๆ&lt;br /&gt;
Insert Frame เป็นการสร้าง frame โดย&lt;br /&gt;
การกระเถิบ ครับ&lt;br /&gt;
Insert Keyframe เป็นการเลือกช่องที่&lt;br /&gt;
ยังไม่มี Frame เลยให้เป็น Frame ว่างๆครับส่วน เจ้า Scene 1 และ Play นั้น&lt;br /&gt;
เป็นการเข้า ฉากครับ เมื่อถ้าเรา&lt;br /&gt;
กด Double click ที่ฉากไหน เราก็จะ&lt;br /&gt;
สามารถ เข้าไปกระทำ Scene ข้างใน&lt;br /&gt;
นั้นได้อีกครับ ต้องลองว่ามันต่างกันตรงไหน ให้คุณลอง ไปเล่นกันดู&lt;br /&gt;
&lt;br /&gt;
หลังจากนั้นให้เรา มาตกแต่งแต่ละ&lt;br /&gt;
Keyframe ดูครับ อ่าเมื่อเราตกแต่งเสร็จแล้ว มาดูของผมดีกว่า ผมจะทำการ Test Run&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJwhfL5PYkO2K20L_FMsIY36k17ml6_1B4tEwO1B7CUZM_NFHpsUjQebPVBwUEhUahhyphenhyphenQOZaJzg9YfoD3dk7_RcR3DMHnG0yejJZAzlo6kw8hArLf7hsnEIzCNoJBRfFgbD9HuNIUdD-3j/s1600/TestPlayGame.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhJwhfL5PYkO2K20L_FMsIY36k17ml6_1B4tEwO1B7CUZM_NFHpsUjQebPVBwUEhUahhyphenhyphenQOZaJzg9YfoD3dk7_RcR3DMHnG0yejJZAzlo6kw8hArLf7hsnEIzCNoJBRfFgbD9HuNIUdD-3j/s400/TestPlayGame.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
นี่ผลงานของผม อ่า มาถึงตานี้&lt;br /&gt;
ให้คุณมาสร้าง Actionscript กันอีกรอบ&lt;br /&gt;
แต่คราวนี้ เราจะมาสร้างหน้า root&lt;br /&gt;
หรือว่า แรกสุดว่างั้น&lt;br /&gt;
หลังจากนั้นก็สร้าง Layer ขึ้นมาใหม่&lt;br /&gt;
ให้ตั้งชื่อว่า Actionscript ครับสาเหตุ&lt;br /&gt;
เพื่อที่เราจะได้ไม่ งง ไงครับ&lt;br /&gt;
&lt;br /&gt;
ผมลืมบอก ให้ทำการตั้งชื่อปุ่มด้วยนะครับ วิธีมีดังนี้ ให้ทำการคลิกที่ปุ่ม ให้&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHP6rdmvAkw2gn402GE1VxEpN1iRiOZp7XjCzfrO_0Y8kNb9d0_Q13xFAZjupBa8y_lgcmxb8OhTM2YMGx8wl19FiZ1UFdOHAnAIUOkMgceXX0NZ66sOGiMyRCjlqKKAdhottWpEy4Nwao/s1600/AAB.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHP6rdmvAkw2gn402GE1VxEpN1iRiOZp7XjCzfrO_0Y8kNb9d0_Q13xFAZjupBa8y_lgcmxb8OhTM2YMGx8wl19FiZ1UFdOHAnAIUOkMgceXX0NZ66sOGiMyRCjlqKKAdhottWpEy4Nwao/s400/AAB.PNG&quot; width=&quot;193&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
ให้คลิกที่ปุ่ม ที่เราสร้างขึ้นครับแล้วทำการ ตั้งชื่อ ใน input box ที่ผมวง&lt;br /&gt;
แดงๆไว้ครับ ผมจะตั้งชื่อว่า PlayGameMath นะครับ&lt;br /&gt;
จากนั้นให้ใส่ code ไว้ใน Layer Actionscript นะครับ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
import flash.external.ExternalInterface;&lt;br /&gt;
import gfx.controls.Button;&lt;br /&gt;
import gfx.motion.Tween;&lt;br /&gt;
_global.gfxExtension = true;&lt;br /&gt;
import mx.utils.Delegate;&lt;br /&gt;
&lt;br /&gt;
PlayGameMath.onPress = function(){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;ExternalInterface.call(&quot;StartGamePlay&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// PlayGameMath.onPress เมื่อ ปุ่ม ที่ชื่อ PlayGameMath ทำการกด&lt;br /&gt;
จะเท่ากับ function เหล่านี้ หมายถึง สร้าง function ย่อยหรือ ทำงานใน&lt;br /&gt;
function นั้นเลยก็ได้&lt;br /&gt;
&lt;br /&gt;
// ExternalInterface.call(&quot;StartGamePlay&quot;); ตัวนี้จะเป็นการเรียก function ใน class GFX นะครับ&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5rdYddTf3epLcgj3CmgUyp-Q26SCdupTDDvCktehbaSNV5NEsElwHipYIihYG19SuY6-Ycg8KPLqIrIr_AJlbBMN4AIT1q7OdF8P7OecGfqAJP5ION2gMqWKOLHLynA8IKNuAK8QYQhvR/s1600/TestGame.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;177&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5rdYddTf3epLcgj3CmgUyp-Q26SCdupTDDvCktehbaSNV5NEsElwHipYIihYG19SuY6-Ycg8KPLqIrIr_AJlbBMN4AIT1q7OdF8P7OecGfqAJP5ION2gMqWKOLHLynA8IKNuAK8QYQhvR/s400/TestGame.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
เมื่อทำการ ใส่ code เสร็จแล้ว เวลาเราไปกด Test แล้วกดปุ่ม ก็จะได้แบบนี้ ขึ้นมาครับ หลังจากนี้ ให้ทำการ&lt;br /&gt;
Save แล้วทำการ Export ครับ&lt;br /&gt;
ไปที่ File &amp;gt; Export &amp;gt; Export movie&lt;br /&gt;
หรือเราจะทำการกด key ลัดโดย&lt;br /&gt;
กด ctrl+alt+shift+s พร้อมกันครับ&lt;br /&gt;
แล้วก็เลือก folder ไว้ที่เดียวกับ file เรานะครับ นั่นก็ต้องอยู่ใน UDKGame &amp;nbsp;&amp;gt; Flash ด้วยนะครับ หลังจากนี้ให้ทำการเข้า Editor ครับ เพื่อเราจะ ได้ Import File ที่เข้าสร้างขึ้นไปใช้กับ unrealscript ครับ&lt;br /&gt;
อ่าก่อนอื่นให้ทำการเข้า Editor ก่อนเลยครับ สังเกตุใน Content ครับ&lt;br /&gt;
จะมีให้สร้าง My_Collection อยู่ ผม กด + เลยทันทีแล้วทำการตั้งชื่อ ผมจะตั้งชื่อว่า My Flash ครับ&lt;br /&gt;
&lt;br /&gt;
อ่าเมื่อได้แล้วทำการ click ขวา&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFiRnHF7_KCfuCVrlrAD4k4tf2LzeuDlmQdS4IXyU1p7DblXQ_mMl8-_UDuA2C6PqEW9tx0Zf0ul9twbkPzjU36VYPl9PFH5iiV-lcbPED9_gxKWjZdKwUXe2bZktTAiuvwK4It28sGU1H/s1600/Import.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;385&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFiRnHF7_KCfuCVrlrAD4k4tf2LzeuDlmQdS4IXyU1p7DblXQ_mMl8-_UDuA2C6PqEW9tx0Zf0ul9twbkPzjU36VYPl9PFH5iiV-lcbPED9_gxKWjZdKwUXe2bZktTAiuvwK4It28sGU1H/s400/Import.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
แล้วก็ทำการเลือกไฟล์ที่อยู่ใน UDKGame &amp;gt; Flash เอาไฟล์ที่คุณ Export มาครับ swf อ่าเมื่อได้แล้ว&lt;br /&gt;
ก็จะขึ้นรูปแดงๆแบบนั้นครับ ให้เราลากไปวาง My Flash เลยครับ&lt;br /&gt;
มันก็จะอยู่ในนั้นหลังจากนั้นให้เรา&lt;br /&gt;
คลิกขวา ที่รูป File ที่เรา Import มาหลังจากนั้นกด คำว่า Save คัรบ&lt;br /&gt;
ซึ่งมันจะอยู่&lt;span style=&quot;color: red;&quot;&gt;ล่างๆ&lt;/span&gt;ครับจากนั้นก็ออก&lt;br /&gt;
Editor เลยครับ มาขึ้น Unrealscript กัน&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;Unrealscript&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;
คราวนี้ เราจะมาสร้าง Class เพื่มอีก สอง Class ครับ MyHUD และ MyGFxHUD&lt;br /&gt;
&lt;br /&gt;
เรามาดูกันเลยครับ Class แรก เขียนอะไรบ้างเน้อ&lt;br /&gt;
&lt;br /&gt;
class MyHUD extends UDKHUD;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Defaultproperties&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//=======================================================&lt;br /&gt;
&lt;br /&gt;
class&amp;nbsp;
MyGFxHUD&amp;nbsp;extends GFxMoviePlayer;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Defaultproperties&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
//=======================================================&lt;br /&gt;
&lt;br /&gt;
หลังจากทำการสร้างแล้วนะครับให้สร้างเพิ่มครับ ตั้งชื่อว่า MainMenuGame.uc นะครับ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class &amp;nbsp;
MainMenuGame&amp;nbsp;extends GameInfo;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Defaultproperties&lt;br /&gt;
{&lt;br /&gt;
HUDType=class&#39;
MyHUD&#39;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
แล้วก็เปลี่ยน ตัวรัน จาก shotcut บทแรกๆที่ผมสอนไปนะครับให้เปลี่ยน&lt;br /&gt;
&lt;br /&gt;
Game=MyGame.TestGame&lt;br /&gt;
&lt;br /&gt;
เป็น&lt;br /&gt;
&lt;br /&gt;
Game=MyGame.MainMenuGame&lt;br /&gt;
&lt;br /&gt;
แทนนะครับ&lt;br /&gt;
&lt;br /&gt;
อ่ะเรามาดู Class&amp;nbsp;MyHUD&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//================================================&lt;br /&gt;
&lt;br /&gt;
class MyHUD extends UDKHUD;&lt;br /&gt;
&lt;br /&gt;
var&amp;nbsp;MyGFxHUD GFxMovieGame;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
singular event Destroyed() {&lt;br /&gt;
&amp;nbsp;if (
GFxMovieGame&amp;nbsp;!= none) {&lt;br /&gt;
&amp;nbsp;
GFxMovieGame.Close(true);&lt;br /&gt;
&amp;nbsp;
GFxMovieGame&amp;nbsp;= none;&lt;br /&gt;
&amp;nbsp;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
simulated function PostBeginPlay() {&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;super.PostBeginPlay();&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;
GFxMovieGame&amp;nbsp;= new class&#39;
MyGFxHUD&#39;; // ทำการเชื่อม class&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;
GFxMovieGame.SetTimingMode(TM_Real); // ตั้ง mode ของ เวลา&lt;br /&gt;
&amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;
GFxMovieGame.start(); // เริ่มการทำงาน จาก class MyGFxHUD&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Defaultproperties&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
//================================================
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
class&amp;nbsp; MyGFxHUD&amp;nbsp;extends GFxMoviePlayer;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function bool Start(optional bool StartPaused = false)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Super.Start(); // เริ่ม ให้&amp;nbsp;MovieInfo ได้แสดงหรือ Show นั้นเอง&lt;br /&gt;
&amp;nbsp; &amp;nbsp; Advance(0); // เวลาที่กำหนด&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
&amp;nbsp; &amp;nbsp; return true; // true = ให้แสดง &amp;nbsp;false = ไม่ให้แสดง หรือ ยังไม่ให้สั่ง start จนกว่าจะ true&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function&amp;nbsp;StartGamePlay(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;ConsoleCommand(&quot;Open 2?Game=MyGame.TestGame&quot;); // เป็นการสั่งการทำงาน ใจรูปแบบ ConsoleCommand สามารถ พิมพ์ในเกมได้ด้วย กด tab จะมี box ขึ้นมาให้พิมพ์ command&lt;br /&gt;
}&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Defaultproperties&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; MovieInfo=SwfMovie&#39;Game1.CLIK_tutorial_skinned&#39;; // ทำการเลือกไฟล์มาโชว์ &amp;nbsp;swfmovie จาก Content&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;bDisplayWithHudOff=TRUE&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;TimingMode=TM_Real&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;bPauseGameWhileActive=TRUE // หยุดเกมจนกว่า จะเป็น false&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;bCaptureInput=true // ให้ Input ยังทำงานได้ต่อ &amp;nbsp;false = ไม่ยอมให้ Input ทำงาน&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
หลังจากเสร็จ ทุกขั้นตอนแล้วลองรันดูครับ อิอิ&lt;br /&gt;
&lt;br /&gt;
จากนั้นมันก็จะเข้าเกม เราเอาแค่นี้ก่อนละกันเดี๋ยว ชื่ออะไร นี่จะขอต่อหลังจาก เกมแรกนะครับ&lt;br /&gt;
&lt;br /&gt;
แต่ต่อเป็นบทอื่นแทนครับ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/4497766378973413656/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/4497766378973413656?isPopup=true' title='1 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/4497766378973413656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/4497766378973413656'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2012/01/scale-form-udk-uiscense-gui-flash.html' title='บทที่ 6 Scale Form'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjqFFsdskpZTvLkHRJX8Vz6oxyR2yLLPeS4QU6bStBBJmBcnqyVDWED5GZ2O6sUw6QTm7oH8PTZOU4WD2Qhti0RMQYQ6XVrg-bGzp_3dPFjlhaZRWpvF6vyiLouXp8GG6M-CrscjbnKQa5w/s72-c/MM.PNG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-860688770987910560</id><published>2012-01-01T00:33:00.000-08:00</published><updated>2012-01-01T00:33:54.514-08:00</updated><title type='text'>Happy New Year 2555</title><content type='html'>สวัสดีครับ ปีนี้ก็ปี 2555 ซึ่งทาง UDKThai ได้ก่อตั้งมา 6 วันแล้ว เราจะพัฒนาให้ดียิ่งขึ้นบทความ&lt;br /&gt;
เราก็จะพยายาม ปรับปรุงอยู่ตลอดเวลา ให้มีความน่าอ่านและอ่านง่ายขึ้น&lt;br /&gt;
&lt;br /&gt;
ขอให้ทุกคน สนุกกับการเขียนเกมนะครับ&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvShKUbmtNLSNvyUpBdRzEB-oqm141Fp9B0Z4yQE_YdHyrI2gA72-fsEWg_TI0RoTE_AlgZ1G7bwGt5ADNY7huhBxBLnS6-fIognqvFLpG366aST94DQ0Wyd6YIPe_pfcvTcojToaUfFSR/s1600/Happy+New+Year.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;212&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvShKUbmtNLSNvyUpBdRzEB-oqm141Fp9B0Z4yQE_YdHyrI2gA72-fsEWg_TI0RoTE_AlgZ1G7bwGt5ADNY7huhBxBLnS6-fIognqvFLpG366aST94DQ0Wyd6YIPe_pfcvTcojToaUfFSR/s640/Happy+New+Year.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/860688770987910560/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/860688770987910560?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/860688770987910560'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/860688770987910560'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2012/01/happy-new-year-2555.html' title='Happy New Year 2555'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjvShKUbmtNLSNvyUpBdRzEB-oqm141Fp9B0Z4yQE_YdHyrI2gA72-fsEWg_TI0RoTE_AlgZ1G7bwGt5ADNY7huhBxBLnS6-fIognqvFLpG366aST94DQ0Wyd6YIPe_pfcvTcojToaUfFSR/s72-c/Happy+New+Year.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-8638700664339285709</id><published>2011-12-31T22:19:00.001-08:00</published><updated>2012-02-05T23:40:54.179-08:00</updated><title type='text'>บทที่ 5.1 PlayerController : Camera</title><content type='html'>วันนี้ผมจะมาสอนเรื่องการสลับ กล้องนะครับและการ ZOOM เข้า ZOOM ออก&lt;br /&gt;
&lt;br /&gt;
ก่อนอื่นคุณต้องเข้าไปดูบทที่ 5 อ่าจำได้ไหมที่ผมสอนว่าสามารถตั้งค่าอะไรพวกนั้นได้&lt;br /&gt;
&lt;br /&gt;
จะมีบาง function ที่เราสามารถนำเข้ามาใช้ได้จริง&lt;br /&gt;
&lt;br /&gt;
ก่อนอื่นก็เลือกปุ่มที่จะเป็นการทำให้ zoom in zoom out นะครับแล้วก็ สังเกตุบรรทัด GBA_&lt;br /&gt;
&lt;br /&gt;
ครับจะเห็นว่า&amp;nbsp;Command= ข้างหลังนี่ นี่มันคือคำสั่งครับ ผมจะเลือก&lt;br /&gt;
&lt;br /&gt;
PrevWeapon และ&amp;nbsp;NextWeapon ซึ่งจะเป็น MouseScrollUp และ MouseScrollDown อ่าาา&lt;br /&gt;
&lt;br /&gt;
ผมรู้ได้ไงครับผมก็เอาเจ้า GBA_ ที่มี command ข้างบนมาดูบรรทัดข้างข้างล่างครับ&lt;br /&gt;
&lt;br /&gt;
บรรทัดข้าง บนจำพวก GBA&lt;br /&gt;
&lt;span id=&quot;fullpost&quot;&gt; 
&lt;br /&gt;
Name=&quot;GBA_PrevWeapon&quot;,Command=&quot;PrevWeapon&quot;&lt;br /&gt;
&lt;br /&gt;
บรรทัดข้างล่าง จำพวก Mouse Keyboard&lt;br /&gt;
&lt;br /&gt;
Name=&quot;MouseScrollUp&quot;,Command=&quot;GBA_PrevWeapon&quot; นี่ไงครับ&lt;br /&gt;
&lt;br /&gt;
อ่าเมื่อเราได้มาแล้วก็เข้าไปที่ MyController เลยครับ&lt;br /&gt;
&lt;br /&gt;
อ่าเมื่อเข้า MyController เสร็จแล้วให้ทำการเขียน&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
exec function PrevWeapon(){&lt;br /&gt;
worldinfo.game.broadcast(self,&quot;Prev&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
exec function&amp;nbsp;
NextWeapon&amp;nbsp;(){&lt;br /&gt;
worldinfo.game.broadcast(self,&quot;Next&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
แล้วลองเลื่อนขึ้นเลื่อนลงดู ครับจะเห็นว่า มี ตัวหนังสือสีขาวๆ Prev กับ Next มาด้วย&lt;br /&gt;
นั่นก็หมายว่าคุณทำถูกต้องแล้วดังนั้นเราจะมาเริ่มใช้คำสั่ง Camera ให้มัน Zoom เข้า Zoom ออกกัน&lt;br /&gt;
&lt;br /&gt;
อ่ะให้เราไปที่ MyPawn อีกรอบแล้วยัด function นี้เข้าไป&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
simulated function name GetDefaultCameraMode( PlayerController RequestedBy )&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; return &#39;FreeCam_Default&#39;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
หลังจากนั้นกลับมาที่ MyController กลับมาที่ function&amp;nbsp;PrevWeapon()&lt;br /&gt;
&lt;br /&gt;
แล้วเพิ่ม&amp;nbsp;PlayerCamera.FreeCamDistance -= 64; ลงไป Next ก็เช่นกันแต่เปลี่ยนจาก&lt;br /&gt;
&lt;br /&gt;
-= มาเป็น += นะครับ สาเหตุก็เพราะว่า ผมจะทำการให้กล้องมัน มีระยะ เลื่อนเข้าเลื่อนออกครับ&lt;br /&gt;
&lt;br /&gt;
อ่ะใส่แล้วลองรันดู&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span id=&quot;fullpost&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnr-dUPKe4W9_g1cl33ZxtOl7LzBg-6fQxXv-Jyq9ZlELX90XgQK37k8SCIlrvX1XBrwvbOYC4rTycutaP7NaUDIUfpvLARb7NyMsoi9RtOgLFx7QAk9MaFjoBg5I2id8HaWhYkXMq6wk0/s1600/cam1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;466&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnr-dUPKe4W9_g1cl33ZxtOl7LzBg-6fQxXv-Jyq9ZlELX90XgQK37k8SCIlrvX1XBrwvbOYC4rTycutaP7NaUDIUfpvLARb7NyMsoi9RtOgLFx7QAk9MaFjoBg5I2id8HaWhYkXMq6wk0/s640/cam1.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span id=&quot;fullpost&quot;&gt;
&lt;br /&gt;
อ่า Zoom เข้า Zoom ออกได้แล้วววว แต่ทำไม Camera หมุน Unit ไม่หมุน นั่นก็เป็นเพราะ Free Camera ไม่ได้สั่งให้ Pawn นั้นหมุน ตาม camera เพราะ เป็น Free ครับมันจะทำให้ทำเกมได้หลากหลายแนว&lt;br /&gt;
ซึ่งวิธีการปรับก็ง่ายๆ เลยครับ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function updaterotation( float time){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;local rotator new_rot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;super.updaterotation(time);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;new_rot = rotation;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;pawn.setrotation(new_rot);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
แล้วลองรันดู ปรากฏว่า ขึ้นลง หัวทำไมดิ่งลงอ่าาาาา เรามีวิธีแก้ดังนี้ เพราะว่า pitch มันไปตามกล้อง&lt;br /&gt;
ดังนั้นเราต้อง fix ให้มันเป็น 0 เอออ ทำไงน้ออออ ก็งี้เลย&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function updaterotation( float time){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;local rotator new_rot;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;super.updaterotation(time);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;new_rot = rotation;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span style=&quot;color: red;&quot;&gt;new_rot.pitch = 0;&lt;/span&gt;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;pawn.setrotation(new_rot);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
แค่นี้แหล่ะ ก็ได้แล้ว&lt;br /&gt;
&lt;br /&gt;
Q: ทำไมถึงต้อง new_rot ด้วยล่ะ เราสั่ง rotation.pitch เลยไม่ได้หรอ&lt;br /&gt;
A: ไม่ได้ครับเพราะว่า rotation เป็นค่า Cont จึงทำการดัดแปลงหรือเปลี่ยนแปลงไม่ได้ รับได้อย่างเดียว&lt;br /&gt;
&lt;br /&gt;
สำหรับวันนี้ ผมขอ เอาไว้แค่นี้ก่อนเดี๋ยว เอาบทความ สร้าง menu กันเลยดีกว่าเพราะ&lt;br /&gt;
ยังไงเดี๋ยวเราได้เจอ ไอพวกนี้หนักแน่ หลังเกมแรก นี่แหละ เร็วๆนี้พบกับ ความโหด มันส์&lt;br /&gt;
และ ระบบ ทำเกมได้แหวกแนวแน่นอน&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: red;&quot;&gt;CalcCamera ใช้คู่กันไม่ได้ ไม่งั้นมันจะไม่ทำการ ZOOM&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinBIP0bdeN5tuVWGcqS6foyGZVM0JDCYW7mY1rlqpt9LEVpkmNn74FAI_JPvHFKrtDFUDylZ8potalqbBWgnwXL3CblPT4sX31zxPguvo3IHiNQZ6ycxDwglC3gQv1gpTchovT0fuBROzi/s1600/99955.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinBIP0bdeN5tuVWGcqS6foyGZVM0JDCYW7mY1rlqpt9LEVpkmNn74FAI_JPvHFKrtDFUDylZ8potalqbBWgnwXL3CblPT4sX31zxPguvo3IHiNQZ6ycxDwglC3gQv1gpTchovT0fuBROzi/s640/99955.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Video Camera&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;a href=&quot;http://udkthai.blogspot.com/2012/02/video-tutorial-camera.html&quot;&gt;Link to page&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/8638700664339285709/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/8638700664339285709?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8638700664339285709'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8638700664339285709'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2011/12/51-playercontroller-camera.html' title='บทที่ 5.1 PlayerController : Camera'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnr-dUPKe4W9_g1cl33ZxtOl7LzBg-6fQxXv-Jyq9ZlELX90XgQK37k8SCIlrvX1XBrwvbOYC4rTycutaP7NaUDIUfpvLARb7NyMsoi9RtOgLFx7QAk9MaFjoBg5I2id8HaWhYkXMq6wk0/s72-c/cam1.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-5900655116127669021</id><published>2011-12-31T04:52:00.000-08:00</published><updated>2012-01-01T19:38:27.168-08:00</updated><title type='text'>บทที่ 5.2 ControlBot</title><content type='html'>วันนี้ผมจะมาสอนส่วนต่างๆ ใน UDKBot นะครับ ผมก็จะสอนให้ Bot วิ่งตาม&lt;br /&gt;
เมื่อ Bot เห็นเราแล้วจะทำการวิ่งตาม หรือการทำให้บอทวิ่งนะครับ&lt;br /&gt;
&lt;br /&gt;
ก่อนอื่นเข้า BotController เลยครับ&lt;br /&gt;
&lt;br /&gt;
การให้ Bot ทำการมองเห็น ผู้เล่น&lt;br /&gt;
ก่อนอื่นผมก็สร้าง&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Event SeePlayer(Pawn Player){&lt;br /&gt;
`log(Player);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
แล้วทำการลองรันดู โดยที่ผมจะไปยืนตรงหน้า bot นะครับ&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjNC5QOQoo59rVcSMXQ_z3IyZr7naeHnQsU9YtL6MeDnn4qBxOgqbNhP3_hvDB0zDlQEmLPMcu8r4EQHvpy-RB31XHeN7Q-fMKHBsp28Il_yBKRuNRmsHJmJr9GxvJZa55RJ237R_MSpUy/s1600/SeePlayer.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;334&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjNC5QOQoo59rVcSMXQ_z3IyZr7naeHnQsU9YtL6MeDnn4qBxOgqbNhP3_hvDB0zDlQEmLPMcu8r4EQHvpy-RB31XHeN7Q-fMKHBsp28Il_yBKRuNRmsHJmJr9GxvJZa55RJ237R_MSpUy/s640/SeePlayer.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span id=&quot;fullpost&quot;&gt; 
มันบอกแล้ว MyPawn_0 หมายถึง Class ผู้เล่น คนที่ 0 นะครับ&lt;br /&gt;
&lt;br /&gt;
อ่ะเราลอง ให้ Bot ทำการ หันหน้ามาหาเราดีกว่าลองดู ครับ&lt;br /&gt;
ลบ `log(Player); ออกใส่&amp;nbsp;Focus = Player; ลงไปแทน แล้วลองรันดูครับ อ่าว มันหันหน้าตาาามม เราด้วยย&lt;br /&gt;
&lt;br /&gt;
ทีนี้จะเป็นการสั่งบอทให้เดิมตามนะครับ&lt;br /&gt;
&lt;br /&gt;
มีอยู่ สองคำสั่ง&lt;br /&gt;
&lt;br /&gt;
MoveTo : การสิ่งบอทวิ่งไปตามที่เรากำหนดไว้&lt;br /&gt;
MoveToWard : การสั่งบอทให้วิ่งตามเร็ว หรือตาม Location ของ Pawn ที่เรากำหนด&lt;br /&gt;
&lt;br /&gt;
มะเรามาลองกัน&lt;br /&gt;
&lt;br /&gt;
เรายังอยู่ที่ BotController&lt;br /&gt;
&lt;br /&gt;
ให้เราสร้าง Variable มาตัวนึงเอาไว้ ตรงหัวเลยครับ&lt;br /&gt;
&lt;br /&gt;
Var Pawn MoveFollow;&lt;br /&gt;
และสร้าง&lt;br /&gt;
State Follow{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
คราวนี้เรามาเพิ่ม การทำงาน&amp;nbsp;ใน Event SeePlayer นะครับ&lt;br /&gt;
MoveFollow = Player;&lt;br /&gt;
เพิ่มตัวนี้เข้าไป แล้ว กระทำการ วิ่งไปหา state ที่ผมตั้งไว้&lt;br /&gt;
ก็พิมพ์เข้าไปอีก&lt;br /&gt;
Gotostate(&#39;Follow&#39;);&lt;br /&gt;
&lt;br /&gt;
หลังจากนั้น ให้คุณไปเพิ่มคำสั่งข้างใน state Follow&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
begin:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MoveToWard(MoveFollow,MoveFollow,20);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;goto(&#39;begin&#39;);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//----------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
var Pawn MoveFollow;&lt;br /&gt;
&lt;br /&gt;
event Possess(Pawn iP,bool bV){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;super.Possess(iP,bV);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Pawn.setMovementPhysics();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Event SeePlayer(Pawn Player){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Focus = Player;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MoveFollow = Player;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Gotostate(&#39;Follow&#39;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
state Follow{&lt;br /&gt;
begin:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MoveToWard(MoveFollow,MoveFollow,20);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;goto(&#39;begin&#39;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
เรามาทำความเข้าใจนะครับว่า&lt;br /&gt;
ทำไมผมจึงต้องสร้าง Variable MoveFollow มาสาเหตุเลยก็เป็นเพราะว่า variable Player มันข้ามไม่ได้&lt;br /&gt;
นั่นเอง แต่มีวิธีลัด ที่จะไม่ต้องสร้าง MoveFollow นั่นก็คือ&lt;br /&gt;
&lt;br /&gt;
MoveToWard(Pawn(Focus),
Pawn(Focus)&amp;nbsp;,20);&lt;br /&gt;
ก็จะทำให้ ไม่จำเป็นต้องสร้าง MoveFollow นั่นเอง&lt;br /&gt;
&lt;br /&gt;
เรามาดูการทำงานและหน้าที่ Parameter กันดีกว่า&lt;br /&gt;
&lt;br /&gt;
MoveToward(Actor NewTarget, optional Actor ViewFocus, optional float DestinationOffset, optional bool bUseStrafing, optional bool bShouldWalk = (Pawn != None) ? Pawn.bIsWalking : false);&lt;br /&gt;
&lt;br /&gt;
1: Actor เป็นเป้าหมายที่กำหนดให้วิ่งตาม&lt;br /&gt;
2: การ Focus หรือการหันของ Bot เนื่องจากถ้า Focus ข้างบนอย่างเดียวมันจะต้องรอให้วิ่งเสร็จ จึงจะหัน จึงต้องใช้ Unit ที่เราจะให้วิ่งตามด้วย นั่นเอง&lt;br /&gt;
3: ระยะทางปายทาง ตัวนี้หมายถึงว่า ระยะห่างในการตามนั่นเอง&lt;br /&gt;
&lt;br /&gt;
เรามาต่อ MoveTo&lt;br /&gt;
&lt;br /&gt;
MoveTo ก็จะคล้ายๆ&lt;br /&gt;
&lt;br /&gt;
คราวนี้ให้เอา คำสั่ง ทั้งหมดของ MoveToWard ข้างต้นออกไปก่อนเพื่อจะได้รู้การทำงาน&lt;br /&gt;
&lt;br /&gt;
เอาล่ะ คราวนี้ ตั้ง state ชื่อว่า Move_To&lt;br /&gt;
&lt;br /&gt;
auto state Move_TO{&lt;br /&gt;
&lt;br /&gt;
begin:&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MoveTo(vect(25,90,0),,0);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;MoveTo(vect(25,0,0),,0);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;goto(&#39;begin&#39;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
แล้วลองรันดู&lt;br /&gt;
&lt;br /&gt;
จะเห็นได้ว่ามันวิ่งไปวิ่งมา Parameter ที่เปลี่ยนไป จาก MoveToWard จะมีแค่ Parameter ตัวที่ 1&lt;br /&gt;
เท่านั้น เปลี่ยนจาก Actor เป็น Vector ซึ่งตัวนี้จะคอยกำหนดระยะทาง เป็น Vector เราสามารถ กำหนดเองได้&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/5900655116127669021/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/5900655116127669021?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/5900655116127669021'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/5900655116127669021'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2011/12/51-myplayercontroller.html' title='บทที่ 5.2 ControlBot'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjNC5QOQoo59rVcSMXQ_z3IyZr7naeHnQsU9YtL6MeDnn4qBxOgqbNhP3_hvDB0zDlQEmLPMcu8r4EQHvpy-RB31XHeN7Q-fMKHBsp28Il_yBKRuNRmsHJmJr9GxvJZa55RJ237R_MSpUy/s72-c/SeePlayer.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-8397547990612199032</id><published>2011-12-31T03:46:00.000-08:00</published><updated>2011-12-31T03:46:10.760-08:00</updated><title type='text'>บทที่ 5 Keyboard Setting</title><content type='html'>ผมจะมาสอนการใช้งาน Config ก่อนยังจำได้ไหมบทที่ 1 ที่ผมบอกส่วนประกอบ ว่า&lt;br /&gt;
เจ้า Config ไว้ผมจะสอน นั่นแหละครับวันนี้ ได้ใช้กันแล้ว ดังนั้น เข้าไปที่ Config&lt;br /&gt;
เรามาดูดีกว่า ว่ามีอะไรกันบ้าง&lt;br /&gt;
&lt;br /&gt;
ก่อนอื่นก็เข้าไปดูที่ Config &amp;gt; DefaultInput&lt;br /&gt;
&lt;br /&gt;
เมื่อเข้าเสร็จ หลายคนอาจจะงงง มันคืออะไรกันเนีย มันก็คือการ ตั้งค่าการควบคุม&lt;br /&gt;
หลังจากนั้น ให้เลื่อนลงมาเลื่อยๆจะเห็น มีคำว่า GBA_ นะครับแถวนั้นคือ function ควบคุมภายในเกม&lt;br /&gt;
&lt;br /&gt;
หลังจาก GBA_ แล้ว&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
;-----------------------------------------------------------------------------------------&lt;br /&gt;
; Game Keyboard/Mouse Bindings&lt;br /&gt;
;-----------------------------------------------------------------------------------------&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
หลังจาก บรรทัดล่าภาษา อังกฤษนี้จะเป็น ตัวที่เชื่อมต่อกับ Keyboard ครับเราสามารถ ตั้งค่าเปลี่ยนแปลงค่าได้ เราสามารถ ปรับเปลี่ยนค่าได้ครับ&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/8397547990612199032/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/8397547990612199032?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8397547990612199032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8397547990612199032'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2011/12/5-keyboard-setting.html' title='บทที่ 5 Keyboard Setting'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-4153167248160859468</id><published>2011-12-30T09:30:00.000-08:00</published><updated>2011-12-31T03:15:09.500-08:00</updated><title type='text'>บทที่ 4.2 Take Damage ( กระทำการโจมตี ศัตรู )</title><content type='html'>การ Take Damage หรือการกระทำ Damage ผมจะมาต่อจาก บทที่ 4.1 นะครับ &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Class MyPawn&lt;br /&gt;
&lt;br /&gt;
ในที่นี้ผมจะใช้ การ Touch นะครับ&lt;br /&gt;
เรามาเริ่มกัน เริ่มจากการเข้าไปดูที่ Properties นะครับ&amp;nbsp;bBlockActors=false นะครับ&lt;br /&gt;
แล้วก็เอา Code ข้างล่างลองไปใส่ ดูครับ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
event Touch(Actor Other, PrimitiveComponent OtherComp, Object.Vector HitLocation, Object.Vector HitNormal)&lt;br /&gt;
{&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Other.TakeDamage( 1, None, Other.location,vect(0,0,0),class&#39;DeathString&#39;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;      &lt;/span&gt;Worldinfo.game.Broadcast(self,string(MyBot(Other).health));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
อ่ะเสร็จแล้วก็จะได้ออกมาดั่งภาพ ข้างล่างครับ&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge9_W1X4BVQQrYXX6XLzoQ-fgOmEZFvNWXuvyFOLykbtfhozjts-jWP7fkqbhXp5s9zIz7Rw0zUZSb6WRRxAc32HGdwSzF5zLlgE2FlBET7wt7DznJCaPmlHdMzuBrhxrP0KaF6BGFC8vw/s1600/9998.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;286&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge9_W1X4BVQQrYXX6XLzoQ-fgOmEZFvNWXuvyFOLykbtfhozjts-jWP7fkqbhXp5s9zIz7Rw0zUZSb6WRRxAc32HGdwSzF5zLlgE2FlBET7wt7DznJCaPmlHdMzuBrhxrP0KaF6BGFC8vw/s640/9998.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
เมื่อได้ดั่งรูปนี้เรา มาทำความเข้าใจในส่วน ที่ผมได้กระทำการเขียนลงไปดีกว่า&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;event&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;TakeDamage&lt;/b&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;(&lt;/span&gt;&lt;a class=&quot;mw-redirect&quot; href=&quot;http://wiki.beyondunreal.com/Int&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; font-size: 10px; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;Int&quot;&gt;int&lt;/a&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;DamageAmount&lt;/b&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://wiki.beyondunreal.com/UE3:Controller_(UDK)&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; font-size: 10px; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;UE3:Controller (UDK)&quot;&gt;Controller&lt;/a&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;EventInstigator&lt;/b&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://wiki.beyondunreal.com/UE3:Object_structs_(UDK)#Vector&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; font-size: 10px; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;UE3:Object structs (UDK)&quot;&gt;Object.Vector&lt;/a&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;HitLocation&lt;/b&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://wiki.beyondunreal.com/UE3:Object_structs_(UDK)#Vector&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; font-size: 10px; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;UE3:Object structs (UDK)&quot;&gt;Object.Vector&lt;/a&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;Momentum&lt;/b&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;,&amp;nbsp;&lt;/span&gt;&lt;a class=&quot;mw-redirect&quot; href=&quot;http://wiki.beyondunreal.com/Class&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; font-size: 10px; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;Class&quot;&gt;class&lt;/a&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;lt;&lt;/span&gt;&lt;a href=&quot;http://wiki.beyondunreal.com/UE3:DamageType_(UDK)&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; font-size: 10px; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;UE3:DamageType (UDK)&quot;&gt;DamageType&lt;/a&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;DamageType&lt;/b&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;, optional&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://wiki.beyondunreal.com/UE3:Actor_structs_(UDK)#TraceHitInfo&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; font-size: 10px; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;UE3:Actor structs (UDK)&quot;&gt;TraceHitInfo&lt;/a&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;HitInfo&lt;/b&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;, optional&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://wiki.beyondunreal.com/UE3:Actor_(UDK)&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; color: #5a3696; font-family: monospace; font-size: 10px; line-height: 19px; text-decoration: none; text-indent: -41px;&quot; title=&quot;UE3:Actor (UDK)&quot;&gt;Actor&lt;/a&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;DamageCauser&lt;/b&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; font-size: 10px; line-height: 19px; text-indent: -41px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;อ่ะเรามาสังเกตุ 5 Parameter แรกเป็น parameter บังคับครับ&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;1 เลยคือจำนวน Damage ครับ&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;2 นี้ผมไม่รู้เหมือนกัน แต่ผมตั้งเป็น none เพราะไม่มีความจำเป็น&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;3 โดนณจุดไหน&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;4 เมื่อโดนจะเคลื่อนย้ายไป vector เท่าไหร่ ลองใส่ดูครับแล้วจะรู้&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: monospace; line-height: 19px; text-indent: -41px;&quot;&gt;5&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;a href=&quot;http://wiki.beyondunreal.com/UE3:DamageType_(UDK)&quot;&gt;http://wiki.beyondunreal.com/UE3:DamageType_(UDK)&lt;/a&gt;&amp;nbsp;เลือกเอาครับ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
6 กับ 7 เอาไว้ตรวจสอบกับ ตัวละคร ที่ก่อให้เกิด Damage ครับ&lt;br /&gt;
&lt;br /&gt;
MyBot(Other).health&lt;br /&gt;
&lt;br /&gt;
ผมว่าหลายคน งง ตรงนี้แน่นอน MyBot คือ Class ที่ผมระบุไว้เพื่อจะเอาไป Convert ครับ&lt;br /&gt;
หรือเรียกง่ายๆ Actor to Pawn ว่าซึ่งด้วยการดันแปลง ให้อยู่ในรูปแบบ Pawn ของ class MyBot ครับ เพราะว่า&lt;br /&gt;
Actor นั้นไม่มี Variable Health ครับจึงต้องดัดแปลงไปอยู่ในรูปแบบเป้าหมายของ Class Pawn เพื่อที่ผม&lt;br /&gt;
จะกำหนดเป้าหมายในการเรียกดูแบบเจาะจงก็จะใช้ Class MyBot นำเลยครับเพราะผมต้องการดู&lt;br /&gt;
HP ของ MyBot ครับ&lt;br /&gt;
&lt;br /&gt;
ส่วน การ Bump ก็ไม่แตกต่างกันครับ เดี๋ยวเรามาต่อเรื่องต่อไปกันดีกว่าครับ&lt;br /&gt;
&lt;br /&gt;
สรุป&lt;br /&gt;
&lt;br /&gt;
TakeDamage คือการกระทำที่ก่อให้เกิดความเสียหายแก่ Player หรือ Bot นั่นเองโดย การให้กำเนิด&lt;br /&gt;
Player หรือ Bot แต่ละครั้ง ระบบจะทำการ กำหนด เลือดมาให้โดย อัตโนมัติ โดยวิธีที่จะทำให้เลือดเริ่ม&lt;br /&gt;
ต้นมีเยอะๆก็ ทำใน Pawn ที่เราจะให้กำเนิด ตั้งใน Properties ให้ ตั้งว่า Health = จำนวนเลือดเลยครับ&lt;br /&gt;
อย่างเช่น MyPawn ของผมก็คือกำหนด การ Pawn ของ Player ส่วน MyBot ก็คือการ กำหนดการ Pawn ของ Bot ครับ&lt;br /&gt;
&lt;div style=&quot;text-indent: -41px;&quot;&gt;
&lt;span style=&quot;font-family: monospace; font-size: xx-small;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/4153167248160859468/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/4153167248160859468?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/4153167248160859468'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/4153167248160859468'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2011/12/42-take-damage.html' title='บทที่ 4.2 Take Damage ( กระทำการโจมตี ศัตรู )'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEge9_W1X4BVQQrYXX6XLzoQ-fgOmEZFvNWXuvyFOLykbtfhozjts-jWP7fkqbhXp5s9zIz7Rw0zUZSb6WRRxAc32HGdwSzF5zLlgE2FlBET7wt7DznJCaPmlHdMzuBrhxrP0KaF6BGFC8vw/s72-c/9998.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-8132576676535216332</id><published>2011-12-30T03:02:00.001-08:00</published><updated>2012-01-01T07:19:57.001-08:00</updated><title type='text'>บทที่ 4 add character ( เพิ่มตัวละคร )</title><content type='html'>&lt;div&gt;
ก่อนอื่นก็ ลบ บทที่ 3 ก่อนนะครับ ซึ่ง&lt;br /&gt;
ในที่นี้ผมจะ เริ่มใหม่แต่ยังไง Class TestGame และ MyPawn และ MyController ของผมอยู่&lt;br /&gt;
ซึ่งจะเปลี่ยนตรง TestGame ของผม ให้เป็น&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;Class TestGame extends gameinfo;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;defaultproperties&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;bRestartLevel=false;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;bDelayedStart=false;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;PlayerControllerClass=class&#39;MyController&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;DefaultPawnClass=class&#39;MyPawn&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
โล่งๆแบบนี้อีกรอบนึง&lt;br /&gt;
ทีนี้ผมจะทำการ สร้าง function ชื่อว่า addbot&lt;br /&gt;
&lt;br /&gt;
function addbot(){&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ให้คุณไปสร้าง file ข้างนอกอีกตัว ชื่อว่า MyBot แล้วทำการ save เป็น .uc&lt;br /&gt;
แล้วก็เข้ามาครับ เข้ามาที่ MyBot แล้วทำการสร้าง Class MyBot&lt;br /&gt;
&lt;br /&gt;
Class MyBot Extends GamePawn;&lt;br /&gt;
&lt;br /&gt;
แล้วก็ทำการ Copy ในส่วนของ DefaultProperties มาครับ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DefaultProperties&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Begin Object Name=CollisionCylinder&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;CollisionRadius=+0070.000000&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;CollisionHeight=+0045.000000&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;BlockZeroExtent=false&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;End Object&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Begin Object Class=DynamicLightEnvironmentComponent Name=env&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;bIsCharacterLightEnvironment=TRUE&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;End Object&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Components.Add(env)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;LightEnvironment=env&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Begin Object Class=SkeletalMeshComponent Name=Robot&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SkeletalMesh=SkeletalMesh&#39;CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;LightEnvironment=env&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AnimSets(0)=AnimSet&#39;CH_AnimHuman.Anims.K_AnimHuman_BaseMale&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AnimTreeTemplate=AnimTree&#39;CH_AnimHuman_Tree.AT_CH_Human&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SkeletalMesh=SkeletalMesh&#39;CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PhysicsAsset=PhysicsAsset&#39;CH_AnimCorrupt.Mesh.SK_CH_Corrupt_Male_Physics&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;End Object&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Mesh=Robot&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Components.Add(Robot)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;bBlockActors=false&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ให้ตัด ControllerClass ออกไปก่อนเพื่อจะมาทดสอบว่าตัวละครที่เรา add มามันออกมาหรือไม่&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;Class MyBot Extends GamePawn;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;DefaultProperties&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Begin Object Name=CollisionCylinder&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;CollisionRadius=+0070.000000&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;CollisionHeight=+0045.000000&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;BlockZeroExtent=false&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;End Object&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Begin Object Class=DynamicLightEnvironmentComponent Name=env&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;bIsCharacterLightEnvironment=TRUE&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;End Object&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Components.Add(env)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;LightEnvironment=env&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Begin Object Class=SkeletalMeshComponent Name=Robot&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SkeletalMesh=SkeletalMesh&#39;CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;LightEnvironment=env&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AnimSets(0)=AnimSet&#39;CH_AnimHuman.Anims.K_AnimHuman_BaseMale&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AnimTreeTemplate=AnimTree&#39;CH_AnimHuman_Tree.AT_CH_Human&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SkeletalMesh=SkeletalMesh&#39;CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PhysicsAsset=PhysicsAsset&#39;CH_AnimCorrupt.Mesh.SK_CH_Corrupt_Male_Physics&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;End Object&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Mesh=Robot&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Components.Add(Robot)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;bBlockActors=fa&lt;/span&gt;lse&lt;br /&gt;
}&lt;/blockquote&gt;
&lt;br /&gt;
ดังนั้นกลับมาที่ file TestGame ครับแล้วเพิ่มใน function addbot() ให้เพิ่มข้างในนะครับ เพิ่มลงไป&lt;br /&gt;
&lt;br /&gt;
Spawn(class&#39;MyBot&#39;,,,vect(0,0,260),);&lt;br /&gt;
&lt;br /&gt;
ก็จะได้&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;Class TestGame extends gameinfo;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;function addbot(){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;Spawn(class&#39;MyBot&#39;,,,vect(0,0,260),);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;defaultproperties&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;bRestartLevel=false;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;bDelayedStart=false;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;PlayerControllerClass=class&#39;MyController&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;DefaultPawnClass=class&#39;MyPawn&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;
แล้วลองรันดู&lt;br /&gt;
&lt;br /&gt;
อั่นแนะมันยังไม่ออก ให้ใช้ auto state ก็ได้ในการ เรียก function นี้หรือว่าจะใช้&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
event PostBeginPlay(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;super.PostBeginPlay();&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp;addbot(); // เรียก function addbot ทำงาน&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;Class TestGame extends gameinfo;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;event PostBeginPlay(){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;super.PostBeginPlay();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;addbot();&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;function addbot(){&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;Spawn(class&#39;MyBot&#39;,,,vect(0,0,260),);&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;defaultproperties&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;bRestartLevel=false;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;bDelayedStart=false;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;PlayerControllerClass=class&#39;MyController&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;DefaultPawnClass=class&#39;MyPawn&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: orange;&quot;&gt;}&lt;/span&gt;&lt;/blockquote&gt;
&lt;br /&gt;
หลังจากนั้นจะได้ภาพที่เห็น&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVeRw2EW1W1Yq52UFBfzhNNW7deOGAFCBD7Lqs_HwWfMLGY7Fupal_34HvECrpB84QXx3jl3TCpyacyOliVWGhTBgaMadx2PcXT2b5hF7YFPN6rDVfP-OJlw0C2-77MSwEgt8K5_E8PPe8/s1600/C3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;368&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVeRw2EW1W1Yq52UFBfzhNNW7deOGAFCBD7Lqs_HwWfMLGY7Fupal_34HvECrpB84QXx3jl3TCpyacyOliVWGhTBgaMadx2PcXT2b5hF7YFPN6rDVfP-OJlw0C2-77MSwEgt8K5_E8PPe8/s640/C3.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
ผมจะให้มันลอยยังงี้ก่อนนะครับเพราะว่าเอาไว้เช็คว่ามีการ ใส่การควบคุม หรือ Control รึยังนะครับ&lt;br /&gt;
&lt;br /&gt;
มาเรามาต่อกันที่ UDKBot นะครับ&lt;br /&gt;
สร้าง file มาอีกหนึ่ง file ชื่อว่า BotController ครับ แล้วกระทำการ save เป็น .uc แล้วก็เข้าไปใน file ไปแก้&lt;br /&gt;
ไข โดยสร้าง Class ชื่อว่า BotController โดยการ Extends เป็น UDKBot ครับ&lt;br /&gt;
เมื่อเสร็จแล้ว ให้ทำการ&lt;br /&gt;
&lt;br /&gt;
สร้าง event Possess ครับ event ตัวนี้จะคล้ายๆให้บอทมีการสวมใส่วิญญาณของมันครับ&lt;br /&gt;
อ่ะโดยการ สร้างมันเลยครับ parameter ตัวแรกจะเป็น pawn และตัวที่สองจะเป็น bool ครับ&lt;br /&gt;
event Possess(Pawn iP, bool bV){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; super.Possess(iP,bV);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Pawn.setMovementPhysics();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ครับแล้วลองรันเกมดู&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYKutYUwCuaj5pqZwQI8VrylmPj_JYFf0KB8YMxvk44iTJb_3gQU7nILWAfkp8y-ltz3g9dApLwWa5xk0kBodU-hfP7egQrLcKVOiAhSXAE_Wz8gpE8wnsHfUfXEaz5Kflv-tBkYis6051/s1600/C4.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;398&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYKutYUwCuaj5pqZwQI8VrylmPj_JYFf0KB8YMxvk44iTJb_3gQU7nILWAfkp8y-ltz3g9dApLwWa5xk0kBodU-hfP7egQrLcKVOiAhSXAE_Wz8gpE8wnsHfUfXEaz5Kflv-tBkYis6051/s640/C4.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
นั่นมันตกลงมาแล้วววว&lt;br /&gt;
&lt;br /&gt;
จริงๆเมื่อ Pawn มาแล้วมันมีเลือดด้วยนะ&lt;br /&gt;
&lt;br /&gt;
อันนี้ผมสร้าง auto state ขึ้นมาเขียนคำสั่ง Worldinfo.game.broadcast(self,string(health));&lt;br /&gt;
ขึ้นมาโชว์ แต่ผมพิมพ์ใน class MyBot นะ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
auto state shouthealt{&lt;br /&gt;
begin:&lt;br /&gt;
worldinfo.Game.Broadcast(self,string(health));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8XHeSeUSMq8QzEUZCJZBw9LmSjxxwFqARwF_w2bATF10RTDe1j4Fu0_8a7T-hSpmkvCfBBDafT_HRw6V16T8uypxtxmHDw_7azR1IVXDIyyJxo6G2Vx197Y9aKl2V0PwAIGQsPaGA71W9/s1600/C5.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;332&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg8XHeSeUSMq8QzEUZCJZBw9LmSjxxwFqARwF_w2bATF10RTDe1j4Fu0_8a7T-hSpmkvCfBBDafT_HRw6V16T8uypxtxmHDw_7azR1IVXDIyyJxo6G2Vx197Y9aKl2V0PwAIGQsPaGA71W9/s640/C5.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
เดี๋ยวเรามาต่อบทที่ 4.2 กันดีกว่า การ Take Damage&lt;br /&gt;
&lt;br /&gt;
สรุป&lt;br /&gt;
&lt;br /&gt;
Spawn เป็น Function ที่ใช้ในการเชื่อมต่อ Class ครับและสามารถใช้คู่กับ Pawn ได้อย่างเข้ากันเลยทีเดียวครับ โดยจะมี parameter ที่คอยกำหนด location และ&amp;nbsp;rotation&amp;nbsp;ครับ&lt;br /&gt;
&lt;br /&gt;
Possess นั้นเป็น function ที่คอยแบบว่าใส่จิตวิญญารให้ เจ้า Controller หรือบอท แม้กระทั้ง Player&lt;br /&gt;
&lt;br /&gt;
setMovementPhysics จะเป็น function ที่กำหนด physic ให้เจ้า bot ของเราครับ เพราะ UDKbot แตกต่างจาก PlayerController ซึ่ง Player หมายถึงเรา Bot หมายถึงสิ่งที่ไม่มีคนควบคุม&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;bBlockActors คือการให้&lt;span style=&quot;white-space: pre;&quot;&gt;ต้องการวิ่งผ่าน Collision ที่ตั้งขึ้นหรือไม่ ถ้า true ก็คือ ไม่่ให้นะครับ แต่ถ้า false&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;white-space: pre;&quot;&gt;คือมันจะไม่ block ก็คือวิ่งผ่านไปได้ครับ&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/8132576676535216332/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/8132576676535216332?isPopup=true' title='2 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8132576676535216332'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8132576676535216332'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2011/12/4-add-character.html' title='บทที่ 4 add character ( เพิ่มตัวละคร )'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiVeRw2EW1W1Yq52UFBfzhNNW7deOGAFCBD7Lqs_HwWfMLGY7Fupal_34HvECrpB84QXx3jl3TCpyacyOliVWGhTBgaMadx2PcXT2b5hF7YFPN6rDVfP-OJlw0C2-77MSwEgt8K5_E8PPe8/s72-c/C3.PNG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-8871729465114678174</id><published>2011-12-28T23:24:00.001-08:00</published><updated>2011-12-29T18:54:46.900-08:00</updated><title type='text'>Content และการ กำหนด File ใน script</title><content type='html'>&lt;script type=&quot;text/javascript&quot;&gt;&lt;!--
google_ad_client = &quot;ca-pub-4359051301743413&quot;;
/* long_banner */
google_ad_slot = &quot;0273383717&quot;;
google_ad_width = 728;
google_ad_height = 90;
//--&gt;
&lt;/script&gt;
&lt;script type=&quot;text/javascript&quot;
src=&quot;http://pagead2.googlesyndication.com/pagead/show_ads.js&quot;&gt;
&lt;/script&gt;
&lt;br /&gt;
ก่อนอื่น ก็ทำการ Run programe UDK Editor ขึ้นมาก่อน // &lt;a href=&quot;http://udkthai.blogspot.com/2011/12/udk-command-line-arguments.html&quot;&gt;การสร้าง shotcut &lt;/a&gt;&lt;br /&gt;
มาเรามาเริ่มใน Editor กันก่อนอื่นก็เข้า Editor ก่อน&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZBZP_ZWYGQdTRMH9E63iX_NgQP7aqNym8k5vvFz7I7hPrKbOpcF8saXXKK8e0Wxti9g_rl-1MHJUJOR3vuS7NS4kpYWWNf4IdOcPGIuglz2R7tJIYF5kDKk-CPFze7SKRj7wATn5Bw6BQ/s1600/33333333.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;346&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZBZP_ZWYGQdTRMH9E63iX_NgQP7aqNym8k5vvFz7I7hPrKbOpcF8saXXKK8e0Wxti9g_rl-1MHJUJOR3vuS7NS4kpYWWNf4IdOcPGIuglz2R7tJIYF5kDKk-CPFze7SKRj7wATn5Bw6BQ/s640/33333333.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
จะเห็นที่ผม วง แดงๆ เอาไว้นะครับให้เข้าตัว Content มันนะครับ ตัวนั้น มีชื่อว่า Content ครับ&lt;br /&gt;
&lt;br /&gt;
พอเสร็จแล้วจะได้ หน้าตา Content แบบนี้&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmis7ps5eqkLPN6jWh6j8w7hug8DZ_oB9QVgSzkHJEEyZRf6Ztkz3K1MXDBvaPyTWNHOopdyv0RVBgGVLyoy-CevroDhNhFzJxM1XfePwLpUQHy2KniKcAznZ4-65KDSMYdAWO_vWO8HtL/s1600/Content.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;405&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhmis7ps5eqkLPN6jWh6j8w7hug8DZ_oB9QVgSzkHJEEyZRf6Ztkz3K1MXDBvaPyTWNHOopdyv0RVBgGVLyoy-CevroDhNhFzJxM1XfePwLpUQHy2KniKcAznZ4-65KDSMYdAWO_vWO8HtL/s640/Content.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
พอได้แล้วเรามาดูส่วนต่างๆกันดีกว่า&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvh7m5L1_RKOMnlP9QGeA8FbDuiG3RmxEbEm9yxq2yawcdMatRh6Uyl6ddFp2WTfDxcQVcUr8vUXjzzJ6CcM1ojjOuZAqqJCubDIz75lUMoiNoHWVyL7stLJHB5Yq6EQW9ritzFHFAnN5P/s1600/Content-file.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;250&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgvh7m5L1_RKOMnlP9QGeA8FbDuiG3RmxEbEm9yxq2yawcdMatRh6Uyl6ddFp2WTfDxcQVcUr8vUXjzzJ6CcM1ojjOuZAqqJCubDIz75lUMoiNoHWVyL7stLJHB5Yq6EQW9ritzFHFAnN5P/s640/Content-file.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
นี้คือการ โชว์ file ต่างๆว่ามีอะไรบ้าง โดยประเภทไฟล์จะเป็นรูปต่าง&lt;br /&gt;
&lt;br /&gt;
สำหรับคนที่เริ่มเขียน สคริป&lt;br /&gt;
&lt;input id=&quot;ask-hide&quot; onclick=&quot;javascript:show();&quot; type=&quot;button&quot; value=&quot;show&quot; /&gt;
&lt;br /&gt;
&lt;div id=&quot;hu-script&quot;&gt;
สังเกตุถ้าได้อ่าน บทความ ที่ผมเขียน script ก่อนหรือว่าพึ่งเคยอ่านก็ตาม&lt;br /&gt;
ให้สักเกตุไว้ว่า เวลาเขียน script ประเภทไฟล์นี้จะเป็น class ที่ตายตัวหรือติดมากับ Engine นั่นแหล่ะ&lt;br /&gt;
แต่ซึ่งด้วยทั้งนี้ทั้งนั้น วิธีการใส่ class file จะเอา path ขึ้นก่อน แล้วตามด้วยชื่อนะครับ&lt;br /&gt;
อย่างเช่น&amp;nbsp;&lt;span style=&quot;background-color: white; font-family: Tahoma, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;SoundCue&#39;path ตามด้วย .name&#39; staticmesh&#39;path ตามด้วย .name&#39;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;มีอีกมากมาย สามารถ ติดตาม blog ผมได้&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: Tahoma, Arial, sans-serif; font-size: 14px; line-height: 19px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
คราวนี้มาดูต่อครับ

&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLmfM_XvX6wovC2KeTff-u7PlYXAUegDv4H0DmVG5VG0A9UBP9utLvic_Xh98NadmrnBEeTNoi4gNLFMy1mmaKLoXGqtq4Wkeo1tuwbeNqnxHxvhyEAdiv9HQm3bqn__mYgmol3-WTjVhI/s1600/Shared+Collections.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiLmfM_XvX6wovC2KeTff-u7PlYXAUegDv4H0DmVG5VG0A9UBP9utLvic_Xh98NadmrnBEeTNoi4gNLFMy1mmaKLoXGqtq4Wkeo1tuwbeNqnxHxvhyEAdiv9HQm3bqn__mYgmol3-WTjVhI/s1600/Shared+Collections.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
มันคือ Collections ของที่ UDK เตรียม มาให้ในนั้นก็จะมีบางอย่างนะครับแต่ไม่ครบ ปุ่ม all คือเอาทุกอย่างที่มีครับ ถ้าเราไม่เอาใน collections ที่มีมาให้เราจะกด all ก้ได้ จะไปสัมพันธุ์ กับ ภาพ search ด้วยนะ&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNe8ooLSVuwd72LLeEyh9uZohN8USsayGsQBExxUQFhvcIIr-jHYTGk8OsGpbQQz0B1MbOs48td8a-rHWX12L_RxwYEPS0CXZRkv040eV0MkDgAr-QSG3RUvRMn11Il1DATKSJ5g_E6xQJ/s1600/Packages.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNe8ooLSVuwd72LLeEyh9uZohN8USsayGsQBExxUQFhvcIIr-jHYTGk8OsGpbQQz0B1MbOs48td8a-rHWX12L_RxwYEPS0CXZRkv040eV0MkDgAr-QSG3RUvRMn11Il1DATKSJ5g_E6xQJ/s1600/Packages.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
แสดงถึง Folder ใน Content ครับ //&amp;nbsp;&lt;a href=&quot;http://udkthai.blogspot.com/2011/12/1-udk.html&quot;&gt;Content ใน บทที่ 1&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4_JUwFoJ50uhqe8hbh-AuJrlBxkdsYVMATJI4nu_VCnHcDBBJGz-qP0IOLVQjBkCStHwMvkkX3Y-SfYPieSUysZGsEskgUxZq9JPjAJc60jNqXd8USJ3NqhJdWBiBssmEu0thyphenhyphenb9hcLuz/s1600/MyCollections.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh4_JUwFoJ50uhqe8hbh-AuJrlBxkdsYVMATJI4nu_VCnHcDBBJGz-qP0IOLVQjBkCStHwMvkkX3Y-SfYPieSUysZGsEskgUxZq9JPjAJc60jNqXd8USJ3NqhJdWBiBssmEu0thyphenhyphenb9hcLuz/s1600/MyCollections.PNG&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
เราสามารถ เพิ่มได้ ถ้าเราต้องการแบบใช้บ่อยๆ ขี้เกียจเข้าไปหาตัวนี้ช่วยได้&lt;br /&gt;
โดย ต้องสร้าง folder โดยการ กดเครื่องหมาย + นะครับ&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOs1WXgirjAlHwa7JVADdyyp1gwQB-lGhSJBDPlpOS9sSqI5Blg8ne7wsP1A6dIl4XLMWaVTQOm-6DF-_azRT3zc45-tPXBk-InNUSD4rY86QvOKr4Mo1JBZ2kgPdlYXoXJRmDSHAWAXcB/s1600/search.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;136&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOs1WXgirjAlHwa7JVADdyyp1gwQB-lGhSJBDPlpOS9sSqI5Blg8ne7wsP1A6dIl4XLMWaVTQOm-6DF-_azRT3zc45-tPXBk-InNUSD4rY86QvOKr4Mo1JBZ2kgPdlYXoXJRmDSHAWAXcB/s640/search.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
ตัวนี้จะแสดงถึง การ search หรือการค้นหาจะมี ประเภทให้เลือก นะครับ แต่ AnimTree เราต้องพิมพ์ AnimTree เอาเองนะครับ เลือก เป็น All type เพราะว่ามันไม่มีปุ่มให้ติ๊ก เมื่อค้นหาได้มันจะมาแสดงใน&lt;br /&gt;
โชว์ไฟล์ครับ&lt;br /&gt;
&lt;br /&gt;
เมื่อรู้จักกัน หมดแล้ว&lt;br /&gt;
วิธีนึงที่ผมใช้ในการ copy ชื่อไฟล์ ไปใส่ใน script ได้รวดเร็ว&lt;br /&gt;
เช่น soundcue&#39;ชื่อไฟล์&#39; วิธีนี้&lt;br /&gt;
ทำให้ผมทำงานได้รวดเร็ว&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiahu1dGgcJEnFI65fq6DQ-VGecMeVtHN2IB_ewUK0hUpoGOQ1_fUMO_YZ4v-WH44_c0YUH4t9NNGhIyPvB3g161c8Mlcf5w-zAYZmJ3LRLg10xz1z-zSbu-EOmDWMUccM3q_YRyT7onjtf/s1600/Untitled-2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;424&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiahu1dGgcJEnFI65fq6DQ-VGecMeVtHN2IB_ewUK0hUpoGOQ1_fUMO_YZ4v-WH44_c0YUH4t9NNGhIyPvB3g161c8Mlcf5w-zAYZmJ3LRLg10xz1z-zSbu-EOmDWMUccM3q_YRyT7onjtf/s640/Untitled-2.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
เลือกไฟล์ที่ต้องการ copy ชื่อนะครับแล้วทำการ คลิก ขวา ก็คือ Copy Full Name to Clipboard&lt;br /&gt;
นี่ก็คือ การ copy ชื่อนะครับ นี่ไงผม copy แล้วมาวางใน blog ผมแล้ว ง่ายไหมครับ&amp;nbsp;SkeletalMesh&#39;CH_IronGuard_Male.Mesh.SK_CH_IronGuard_MaleA&#39;&lt;br /&gt;
&lt;br /&gt;
จากนั้นผมก็ไปทดลองใส่ class ที่ผมเตรียมเอาไว้&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://udkthai.blogspot.com/2011/12/2-gameinfo-pawn-controller.html&quot;&gt;บทที่ 2&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;style&gt;
#hu-script { border:1px solid #333; height:0px; width:700px; overflow:scrollbar; }
&lt;/style&gt;

&lt;script&gt;
document.getElementById(&#39;hu-script&#39;).style.visibility = &#39;hidden&#39;;

function show(){
     
       var box = document.getElementById(&#39;hu-script&#39;);
       var box2 = document.getElementById(&#39;ask-hide&#39;);
       if(box2.value == &#39;show&#39;){
       box.style.height = &#39;500px&#39;;
       box.style.visibility = &#39;visible&#39;;
       box2.value = &#39;hide&#39;;
       }
       else
       {
       box.style.height = &#39;0px&#39;;
       box.style.visibility = &#39;hidden&#39;;
       box2.value = &#39;show&#39;;
       }
}
&lt;/script&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/8871729465114678174/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/8871729465114678174?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8871729465114678174'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8871729465114678174'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2011/12/copy-file-class.html' title='Content และการ กำหนด File ใน script'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZBZP_ZWYGQdTRMH9E63iX_NgQP7aqNym8k5vvFz7I7hPrKbOpcF8saXXKK8e0Wxti9g_rl-1MHJUJOR3vuS7NS4kpYWWNf4IdOcPGIuglz2R7tJIYF5kDKk-CPFze7SKRj7wATn5Bw6BQ/s72-c/33333333.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-690744016669937106</id><published>2011-12-27T19:04:00.000-08:00</published><updated>2013-11-02T03:52:40.211-07:00</updated><title type='text'>UDK PhysX</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;พู&lt;/span&gt;ดถึงเรื่อง PhysX คงขาดไม่ได้เลยเจ้า Nvidia&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
PhysX คือการประมวลผลทำให้ การเคลื่อนไหว ทุกสิ่งที่อย่างที่ PhysX พึงกระทำได้จะทำให้&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
การเคลื่อนไหวนั้นๆ ขยับได้สมจริง มากขึ้น โดยในที่นี้คงรู้ๆกันอยู่ว่า เจ้า PhysX ทำงานผลเป็น&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
ยังไง แต่ใน UDK หลายคนยังไม่ได้เห็นของจริงอ่าเรามาดู Clip กันดีกว่าว่า อันไหนบ้างคือ&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
PhysX ครับ&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;iframe allowfullscreen=&#39;allowfullscreen&#39; webkitallowfullscreen=&#39;webkitallowfullscreen&#39; mozallowfullscreen=&#39;mozallowfullscreen&#39; width=&#39;420&#39; height=&#39;366&#39; src=&#39;https://www.youtube.com/embed/S8h8GY51Gws?feature=player_embedded&#39; frameborder=&#39;0&#39;&gt;&lt;/iframe&gt;&lt;br /&gt;
&lt;br /&gt;
มันเป็น Technology ที่OK ครับผมบอกได้คำเดียวว่า มันทำให้เกมดูมีชีวิตชีวา มากขึ้นครับ&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/690744016669937106/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/690744016669937106?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/690744016669937106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/690744016669937106'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2011/12/udk-physx.html' title='UDK PhysX'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-1479053706133540586</id><published>2011-12-27T18:55:00.000-08:00</published><updated>2011-12-27T21:48:29.219-08:00</updated><title type='text'>UDK Requirement System</title><content type='html'>&lt;span style=&quot;font-size: x-small;&quot;&gt;ในที่นี้เรามาเข้าใจกันก่อนว่า&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;UDK มันต้องการ ระบบอะไรบ้าง&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #333333; font-family: Arial, Helvetica, sans-serif; font-size: 1em; line-height: 20px; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;



&lt;/h3&gt;
&lt;h3 style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; font-size: 1em; margin-bottom: 10px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;



Minimum:&lt;/h3&gt;
&lt;ul style=&quot;border-bottom-width: 0px; border-color: initial; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; color: #666666; font-size: 12px; font-weight: normal; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;
&lt;li style=&quot;background-color: transparent; border-bottom-width: 0px; border-color: initial; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;Windows XP SP3 or Windows Vista&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border-bottom-width: 0px; border-color: initial; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;2.0+ GHz processor&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border-bottom-width: 0px; border-color: initial; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;2 GB system RAM&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border-bottom-width: 0px; border-color: initial; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;SM3-compatible video card&lt;/li&gt;
&lt;li style=&quot;background-color: transparent; border-bottom-width: 0px; border-color: initial; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; vertical-align: baseline;&quot;&gt;3 GB Free hard drive space&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;ที่ขึ้นอยู่นี่นะครับ เป็นระบบ ขั้นต้น คือต้องการ XP หรือ Vista หรือ 7 ก็ได้ครับ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;โดย CPU 1 core 2 process ก็&amp;nbsp;pentium 4 หรือ ต่ำกว่านั้น ก็ได้&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;โดย Ram อย่างมาก 2 GB&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;spec ที่ขายในไทยแนะนำ&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;(&lt;span style=&quot;color: red;&quot;&gt;&lt;b&gt;ถูกที่สุด และสำหรับคนที่ยังไม่มีคอม&lt;/b&gt;&lt;/span&gt;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot;&gt;Celeron G530______________________1520&lt;/span&gt;&lt;br style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot; /&gt;&lt;span style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot;&gt;ECS H61H2-M2_____________________1520&lt;/span&gt;&lt;br style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot; /&gt;&lt;span style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot;&gt;Kingston DDR3 1333 4 GB_____________670&lt;/span&gt;&lt;br style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot; /&gt;&lt;span style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot;&gt;HDD 500 GB_______________________2500&lt;/span&gt;&lt;br style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot; /&gt;&lt;span style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot;&gt;Case + PSU________________________700&lt;/span&gt;&lt;br style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot; /&gt;&lt;br style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot; /&gt;&lt;span style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot;&gt;6910&lt;/span&gt;&lt;br style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot; /&gt;&lt;span style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot;&gt;+ DVD-RW 500&lt;/span&gt;&lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;font-family: Verdana, Arial, Tahoma, Calibri, Geneva, sans-serif; font-size: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;strong style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; clear: right; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-style: inherit; font-weight: bold; max-width: 160px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; width: auto; word-wrap: break-word;&quot;&gt;ขอบคุณ คุณ&amp;nbsp;&lt;a class=&quot;username offline popupctrl&quot; href=&quot;http://www.thaicybergames.com/main/member.php?u=1044279&quot; id=&quot;yui-gen27&quot; style=&quot;background-attachment: initial; background-clip: initial; background-image: none; background-origin: initial; clear: right; font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-weight: bold; max-width: 160px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none; width: auto; word-wrap: break-word;&quot; title=&quot;SolunaZero is offline&quot;&gt;SolunaZero&lt;/a&gt;&lt;/strong&gt;&lt;span style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; line-height: 13px;&quot;&gt;&amp;nbsp; &lt;b&gt;เป็นคนจัด spec ให้&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 11px; line-height: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;&lt;span style=&quot;font-family: Tahoma, Calibri, Verdana, Geneva, sans-serif; font-size: 11px; line-height: 13px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #666666; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;ส่วนเจ้า Dx11 ความจริงถ้าไม่จำเป็นอย่าพึ่งไปเล่นมันมากครับ เพราะ 1 คือถ้าจะใช้ขั้นสูงๆ ราคา hardware ก็ต้องสูงตาม&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;Tessellation อะไรพวกนี้ถ้าคุณไม่พร้อมอย่าเล่นแต่ถ้าไม่เล่น Tessellation ก็ได้ครับเพราะองค์ประกอบ Dx11 แสงอะไร&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;จะดีกว่า DX9 ครับ โดยรวมผมก็ว่ามันดีนะ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 20px;&quot;&gt;Coming Soon ราคาขั้นสูง&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/1479053706133540586/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/1479053706133540586?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/1479053706133540586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/1479053706133540586'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2011/12/udk-requirement-system.html' title='UDK Requirement System'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-8302676145907759947</id><published>2011-12-27T01:46:00.000-08:00</published><updated>2013-11-02T03:52:17.802-07:00</updated><title type='text'>บทที่ 3.1 SoundCue</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Sound Cue&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;หรือ&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;การเล่นเสียง&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;ในที่นี้ผมจะมาสอนการเขียน script ในการเล่นเสียงนะครับ&lt;/b&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;
วันนี้เราจะมาเล่นเสียงกันนะครับ&lt;br /&gt;
โดยที่เรา&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ก่อนอื่นก็มาเริ่มเขียนกันเลยดีกว่าเพื่อเป็นการไม่เสียเวลา
เรามาทำความเข้าใจกับเสียงก่อนดีกว่า 

&lt;br /&gt;
เราจะมาต่อ ยอด code จาก บทที่ 2,3 กัน&lt;br /&gt;
&lt;br /&gt;
คราวนี้เปิดตัว Editor ขึ้นมามาทำการเลือก Sound Cue กันผมก็จะหยิบเสียงมาหนึ่งตัว&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1y5VjN0YlQucq4pLWJhuZP5xXpLgu1nshM3wK0btSbFA1hejUbzPmRmk-IK7D4C6KQVKBZIRypxv6GHS7fITvCCgyE-qlh3sMvPus-LNvEjZ1KjgamNBABVMkQNx_iu79jnYjQ-4oqZLQ/s1600/soundcue.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;355&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1y5VjN0YlQucq4pLWJhuZP5xXpLgu1nshM3wK0btSbFA1hejUbzPmRmk-IK7D4C6KQVKBZIRypxv6GHS7fITvCCgyE-qlh3sMvPus-LNvEjZ1KjgamNBABVMkQNx_iu79jnYjQ-4oqZLQ/s400/soundcue.PNG&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
เมื่อเลือกได้แล้ว ก็จะทำการสร้าง code กันเลยจะต่อยอดจากบทที่ 3 นะครับ&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
บทที่สามนี่ ผมจะพูดถึงเรื่องการ win อะไรพวกนี้ใช่ไหมครับ งั้นเราลองมาสร้างเสียงแห่งชัยชนะกัน&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
ดีกว่า เอาล่ะมาเริ่มกัน เรามาดู code เก่าๆกันก่อนดีกว่า&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
Class TestGame extends gameinfo;&lt;br /&gt;
&lt;br /&gt;
var string win;&lt;br /&gt;
&lt;br /&gt;
event postbeginplay(){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;super.postbeginplay();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SetTimer(5,false,nameOf(Ending));&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function Ending(){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;EndGame(none,&quot;Lost&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function bool CheckModifiedEndGame(PlayerReplicationInfo Winner, string Reason){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(Reason == &quot;Lost&quot;){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return false;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function PerformEndGameHandling()&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;//super.PerformEndGameHandling();&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;RestartGame();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function string GetNextMap(){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;if(win == &quot;winner&quot;){&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;return &quot;2.udk&quot;;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
defaultproperties&lt;br /&gt;
{&lt;br /&gt;
win = &quot;winners&quot;&lt;br /&gt;
bRestartLevel=false;&lt;br /&gt;
bDelayedStart=false;&lt;br /&gt;
PlayerControllerClass=class&#39;MyController&#39;&lt;br /&gt;
DefaultPawnClass=class&#39;MyPawn&#39;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
อ่่าทีนี้ ผมจะมาลองใส่ code ข้างใน&amp;nbsp;function Ending นะครับ&lt;br /&gt;
มาลองกันก่อนอื่นเราต้องนำเข้าเสียงขึ้นมาก่อนทำยังไงล่ะ ผมมีสองทางเลือก&lt;br /&gt;
&lt;br /&gt;
ตัวอย่างคือ&lt;br /&gt;
&lt;br /&gt;
Var soundcue sound_a;&lt;br /&gt;
&lt;br /&gt;
แล้วไปตั้ง defaulproperties&lt;br /&gt;
ว่า&lt;br /&gt;
&lt;br /&gt;
//&amp;nbsp;&lt;a href=&quot;http://udkthai.blogspot.com/2011/12/copy-file-class.html&quot;&gt;เลือก File ใน Editor มาใช้งาน&lt;/a&gt;
&lt;br /&gt;
sound_a=soundcue&#39;file ที่เลือก&#39;&lt;br /&gt;
&lt;br /&gt;
แล้วก็ไปกำหนดใน function Ending&lt;br /&gt;
PlaySound(sound_a);&lt;br /&gt;
&lt;br /&gt;
//--------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
วิธีที่สอง&lt;br /&gt;
&lt;br /&gt;
กำหนด&lt;br /&gt;
&lt;br /&gt;
//&amp;nbsp;&lt;a href=&quot;http://udkthai.blogspot.com/2011/12/copy-file-class.html&quot;&gt;เลือก File ใน Editor มาใช้งาน&lt;/a&gt;
&lt;br /&gt;
PlaySound(soundcue&#39;file ที่เลือก&#39;);&lt;br /&gt;
&lt;br /&gt;
//-------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
ของผมจะใช้แบบวิธีที่สองนะครับ&lt;br /&gt;
&lt;br /&gt;
function Ending(){&lt;br /&gt;
PlaySound(SoundCue&#39;A_Music_RomNecris01.MusicSegments.A_Music_RomNecris01_Victory01Cue&#39;);&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;EndGame(none,&quot;Lost&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
แล้วมาลองรันดู&lt;br /&gt;
ตอนชนะก็จะได้เสียงออกมา&lt;br /&gt;
&lt;br /&gt;
สรุป&lt;br /&gt;
&lt;br /&gt;
PlaySound = function ที่ทำงานด้านเสียง</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/8302676145907759947/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/8302676145907759947?isPopup=true' title='2 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8302676145907759947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/8302676145907759947'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2011/12/32-soundcue.html' title='บทที่ 3.1 SoundCue'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1y5VjN0YlQucq4pLWJhuZP5xXpLgu1nshM3wK0btSbFA1hejUbzPmRmk-IK7D4C6KQVKBZIRypxv6GHS7fITvCCgyE-qlh3sMvPus-LNvEjZ1KjgamNBABVMkQNx_iu79jnYjQ-4oqZLQ/s72-c/soundcue.PNG" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-6038409627476955700</id><published>2011-12-26T06:53:00.001-08:00</published><updated>2011-12-28T23:19:46.444-08:00</updated><title type='text'>บทที่ 4.1 function Bump หรือ Touch</title><content type='html'>เรามาดูความแตกต่างระหว่าง&lt;br /&gt;
&lt;br /&gt;
Touch กับ Bump&lt;br /&gt;
&lt;br /&gt;
เดี๋ยวขอเวลาเขียน unreal script แปบนึง&lt;br /&gt;
ที่ผมเคยใช้แต่ยังไม่ได้หา ความจริงแต่อย่างใด&lt;br /&gt;
&lt;br /&gt;
คือ Touch เนียเราจะต้องเข้าไปใน Collision แต่ไม่ได้หมายความว่า เราจะต้องปิดหรือยกเลิก Coillsion&lt;br /&gt;
สำหรับ Actor นะครับ ( Actor ในที่นี้คือ ตัวละครนั่นแหล่ะครับ ) ฉะนั้น การที่จะใช้ Touch ได้จะต้องทำคู่กับ&amp;nbsp;bBlockActors=false ซึ่งถ้าเป็น true จะไม่สามารถ เดิน ผ่าน Collision ไม่ได้อยู่ดี ฉะนั้นตัวนี้แหล่ะที่ทำให้ ผม งงอยู่นานส่วน การ bump ก็การวิ่งพุ่งไปชน โดยมาการเคลื่อนไหวชน&amp;nbsp;Collision&amp;nbsp;จะทำให้&lt;br /&gt;
bump เกิดการทำงานเกิดขึ้น&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ก่อนอื่นเรามาเริ่มกันที่ Class MyPawn ก่อนครับ เรามาทำความเข้าใจกันก่อน&lt;br /&gt;
การ Bump หรือ การ Touch ต้องมี Collision เราจะต้องสร้าง สิ่งนี้ขึ้นมาโดยเราสามารถ กำหนดใน&lt;br /&gt;
DefaultProperties ได้ครับ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Begin Object Name=CollisionCylinder&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;CollisionRadius=+0034.000000 // ระรอบๆ เป็นวงกลม&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;CollisionHeight=+0047.000000 // ความสูง&lt;br /&gt;
End Object&lt;br /&gt;
&lt;br /&gt;
โดยชื่อเริ่มต้น ก็คือ&amp;nbsp;CollisionCylinder เปลี่ยนแปลงไม่ได้ครับ ถ้าเปลี่ยน มันไม่รู้จักเลย ในที่นี้ผมจะใช้&lt;br /&gt;
Collision แบบ&amp;nbsp;Cylinder นะครับ&lt;br /&gt;
&lt;br /&gt;
ทำไมถึงต้องประกาศ ทั้งๆที่ค่าเริ่มต้นมันก็มี Collision อยู่แล้ว คำตอบคือเจ้า Collision เนียถ้าเราไม่ประกาศ เวลามันจะตั้งเป็นค่าเริ่มต้นให้เวลาใส่ model ลักษณะเล็กๆใหญ่ๆ Model มันจะไม่เกาะพื้นมันจะลอยแบบนี้&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis4AFG7fr6R_E7mDBqpHL10uzNsIC1IomONzQSh-xCCB1Wn4V4dLgcoBaM0ykL2MyoZZWJPxfojYrM-l5rlDA48r4asO6-RD4VLnhavdufCTAYWtDUkkI1oHcLb8ii31XWQTVkZ8mOHBmx/s1600/333.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;328&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis4AFG7fr6R_E7mDBqpHL10uzNsIC1IomONzQSh-xCCB1Wn4V4dLgcoBaM0ykL2MyoZZWJPxfojYrM-l5rlDA48r4asO6-RD4VLnhavdufCTAYWtDUkkI1oHcLb8ii31XWQTVkZ8mOHBmx/s640/333.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
จะได้ดั่งภาพที่เห็น ว่ามันลอยจริงๆ&lt;br /&gt;
ดังนั้นเราควรจะ ตั้ง Collision ให้มัน&lt;br /&gt;
เอาล่ะเรามาตั้ง&amp;nbsp;Touch&amp;nbsp;กันเถอะ&lt;br /&gt;
ก่อนอื่นก็ ใส่ collision ที่ผมให้ข้างบนกันก่อนดีกว่าครับ&lt;br /&gt;
เพิ่ม&amp;nbsp;bBlockActors=false ใน defaultproperties ครับ&lt;br /&gt;
&lt;br /&gt;
จากนั้น ก็มาลอง&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
event Touch(Actor Other, PrimitiveComponent OtherComp, Vector HitLocation, Vector HitNormal)&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;`log(&quot;test&quot;);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
วางใน Class MyPawn ที่ผมสร้างขึ้นมา&lt;br /&gt;
แล้วไปลองรันดูว่า log มันขึ้น คำว่า test หรือเปล่า&lt;br /&gt;
ถ้าขึ้นคุณมาถูกทางแล้ว&lt;br /&gt;
&lt;br /&gt;
ที่นี้เรามาดู Parameter ตัวที่หนึ่งจะหมายถึง ตัวละครที่เราวิ่งผ่าน&lt;br /&gt;
ส่วนตัวที่สองผมยังไม่เคยใช้มันจริงๆจังๆ เลยไม่อยากอธิบาย&lt;br /&gt;
ตัวที่สาม วิ่งผ่านที่จุดไหน ตัวที่ สี่คือ จุดมตราฐาน มันก็คือว่า เราวิ่งผ่าน Collision ที่เป็นวงกลม&lt;br /&gt;
เมื่อเราวิ่งผ่านไปตัดจุดไหน แบบเมื่อเข้า Collision เมื่อไหร่ ณ ตอนนั้น มันจะแสดงให้เห็นว่า&lt;br /&gt;
เราเข้า ไป touch ในจุด sin cos นั้นจะทำการ แสดง vector ออกมาว่า เราได้เข้า ณ ที่จุด vector นั่นๆ&lt;br /&gt;
นั่งเอง ( ว่างๆ จะหาตัวอย่างมาให้ )&lt;br /&gt;
&lt;br /&gt;
เรามาดูในส่วน bump กันก่อนดีกว่า&lt;br /&gt;
&lt;br /&gt;
event bump(Actor Other, PrimitiveComponent OtherComp, Vector HitLocation){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;`log(&quot;test&quot;);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ก็จะเหมือน ข้างบนเลยครับ parameter แต่จะไม่มี parameter ที่ 4 เพียงตัวเดียว&lt;br /&gt;
ดังนั้น&lt;br /&gt;
&lt;br /&gt;
คราวนี้ก็ถึงตาคุณ ประยุคใช้แล้วล่ะครับ&lt;br /&gt;
&lt;br /&gt;
อันนี้ ตัวอย่าง Touch&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcQpR8DaZvjqkSHDBDV5rg8wW5uJhnu9APeL6-kzoLEJqBBuSucyQAY9Av-tlg-4jxOCs8CsI-NEBQoMXsKCPsTNlOL496fYR1DLljlcN-9V2a2prS1_InOZmZymZla_5r24eJcWjID3qQ/s1600/33333.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;362&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcQpR8DaZvjqkSHDBDV5rg8wW5uJhnu9APeL6-kzoLEJqBBuSucyQAY9Av-tlg-4jxOCs8CsI-NEBQoMXsKCPsTNlOL496fYR1DLljlcN-9V2a2prS1_InOZmZymZla_5r24eJcWjID3qQ/s640/33333.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
อันนี้ผมตั้ง Radius ไว้ที่ 70 ครับ มันเลย แสดงออกผลมาก่อน&lt;br /&gt;
จะสังเกตุได้จาก scriptlog นะครับเพราะว่าผมไม่ได้พิมพ์ Test แต่ผม log ในค่าของ hitNormal นะครับ&lt;br /&gt;
&lt;br /&gt;
ในที่นี้สามารถ ทำเกมเช่นแนว Mario ได้ และอื่นๆ&lt;br /&gt;
&lt;br /&gt;
สรุป&lt;br /&gt;
&lt;br /&gt;
Touch คือการเข้าไปอยู่ใน Collision ครับ&lt;br /&gt;
Bump คือเมื่อเกิดการชนเกิดขึ้น&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/6038409627476955700/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/6038409627476955700?isPopup=true' title='0 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/6038409627476955700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/6038409627476955700'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2011/12/31-function-bump-touch.html' title='บทที่ 4.1 function Bump หรือ Touch'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEis4AFG7fr6R_E7mDBqpHL10uzNsIC1IomONzQSh-xCCB1Wn4V4dLgcoBaM0ykL2MyoZZWJPxfojYrM-l5rlDA48r4asO6-RD4VLnhavdufCTAYWtDUkkI1oHcLb8ii31XWQTVkZ8mOHBmx/s72-c/333.PNG" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-3272153277009169682</id><published>2011-12-25T04:09:00.001-08:00</published><updated>2011-12-28T23:40:44.308-08:00</updated><title type='text'>บทที่ 3 Game Start &amp; Game Over</title><content type='html'>&lt;span style=&quot;font-size: large;&quot;&gt;สำหรับการเขียน Unrealscript ชุดนี้ Request&amp;nbsp;Knowledge&lt;/span&gt;&lt;br /&gt;
ให้เข้าไปอ่าน&amp;nbsp;&lt;a href=&quot;http://udkthai.blogspot.com/2011/12/2-gameinfo-pawn-controller.html&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;บทที่ 2&lt;/span&gt;&lt;/a&gt;&amp;nbsp;ก่อนนะครับ&lt;br /&gt;
&lt;br /&gt;
เรามาดู Function ที่จะใช้กันดีกว่า&lt;br /&gt;
&lt;br /&gt;
EndGame คือการจบเกมครับ เป็น function ที่ทำให้ Game เวลานั้นๆ หยุดเดิน หรือ พรอต เกมเอาไว้ครับ&lt;br /&gt;
โดยที่ function นี้สามารถ แก้ไขได้ โดยที่เราจะใช้การ simulated ก่อน หรือว่าจะเป็น function ไปเลยก็ได้&lt;br /&gt;
แล้วการ super เพื่อสืบทอด function ข้างบนมาอีกที&amp;nbsp;โดย function นี้จะอยู่ ใน Class GameInfo เท่านั้น&lt;br /&gt;
&lt;br /&gt;
รูปตัวอย่าง ผมกระโดด พอ เวลา ครบมันก็จะหยุดเลยทันที โดยที่ผมตั้งเวลาไว้ 3 วินาที&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfh6cCuKtT7mwuSvgALjPNMxB0gzwv9YzElkgocUINcODEd-LZWnarrJNFShrZXKc0mienNlO7n6LxXd0ZOw_HIYzyB41s_wNxQyFAJlIEolGsQeVfnzL7Ptvu5PXrIJf7Zwe8ETlzmnXC/s1600/TAB.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;189&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfh6cCuKtT7mwuSvgALjPNMxB0gzwv9YzElkgocUINcODEd-LZWnarrJNFShrZXKc0mienNlO7n6LxXd0ZOw_HIYzyB41s_wNxQyFAJlIEolGsQeVfnzL7Ptvu5PXrIJf7Zwe8ETlzmnXC/s320/TAB.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
GetNextMap จะมีวิธีการใช้ ก็คือ เอาค่า return ไปเป็นการเปลี่ยน ย้าย map ต่อไป อย่างเช่น&lt;br /&gt;
เราสร้างมา 2 map. map ที่ 1 คือ 1.udk map ที่ 2 คือ 2.udk&lt;br /&gt;
แล้วเราลองมาใช้ function นี้ดู โดย function นี้จะอยู่ ใน Class GameInfo เท่านั้น&lt;br /&gt;
โดยเราโผล่มาจะต้องอยู่ใน map ที่ 1.udk จึงจะเห็นผลว่า function นี้ ย้ายไป map อื่นจริงๆ&lt;br /&gt;
&lt;br /&gt;
ตัวอย่างเช่น&lt;br /&gt;
&lt;br /&gt;
function String GetNextMap(){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return &quot;2.udk&quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
CheckModifiedEndGame เป็น Function ที่ใช้คู่กับ EndGame อีกทีโดยจะใช้เชื่อม กับ GetNextMap ทำให้&lt;br /&gt;
เหมือนว่าเราชนะ นั่นเอง เพราะ function Winner จริงๆ มันไม่มี เลยต้องใช้แบบนี้แทนตัวนี้จะเป็นการ&lt;br /&gt;
ตรวจสอบก่อน จะ EndGame จริงๆ ครับจะตรวจสอบ เป็น Boolean ครับ โดย return false ก็คือจบจริงๆ&lt;br /&gt;
ส่วน return true ก็คือ ยังไม่จบเกม&lt;br /&gt;
เมื่อ function ข้างบน check แล้ว endGame แล้วแต่ตัวที่จะทำงานต่อหลังจากนี้คือ&lt;br /&gt;
PerformEndGameHandling ครับจะเป็นตัวที่เราสามารถเขียนต่อว่าจะทำยังไงต่อ&lt;br /&gt;
เช่นจะใช้การ RestartGame(); เป็นต้นโดย&amp;nbsp;RestartGame(); จะเข้าไปอ่านใน function GetNextMap ครับ&lt;br /&gt;
จะสังเกตุได้ว่า เมื่อ function Restart ตัวนี้ทำงานแล้วเราไม่ใช่ function GetNextMap มันจะกลับมาอยู่&lt;br /&gt;
ใน Map เดิม ซึงเราคุณสามารถ ต่อยอดเป็นอะไรก็ได้แล้วแต่จินตนาการ คุณแล้ว&lt;br /&gt;
มาดูตัวอย่างกัน&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;function bool CheckModifiedEndGame(PlayerReplicationInfo Winner, string Reason)&lt;/span&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;ส่วน function EndGame&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;function EndGame&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;(PlayerReplicationInfo Winner, string Reason)&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;สังเกตุว่า Parameter จะเหมือนกันดังนั้นเมื่อกำหนดให้ EndGame(none,&quot;ค่าที่จะใช้ว่าแพ้&quot;)&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;เข้าไปทำการเขียน&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;CheckModifiedEndGame ขึ้นมาใหม่&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt; ใน &lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;CheckModifiedEndGame&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;เช่น&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;function bool CheckModifiedEndGame(PlayerReplicationInfo Winner, string Reason){&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;if(Reason == &quot;Lost&quot;){&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;                `log(&quot;Test&quot;); // แล้วลอง ดูที่ Log เอง&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;  &lt;/span&gt;return false;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;return true;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;event postbeginplay(){
 super.postbeginplay();
        SetTimer(3,false,nameOf(Ending)); // ตัว countDown ครับ
}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;function Ending(){
 EndGame(none,&quot;Lost&quot;);
}&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;
&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;เมื่อทำการ run แล้วจะเห็นใน Log Console จะเป็น Test อยู่ดังนั้นก็แสดงว่า parameter กำหนด&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;string มีค่าเป็น Lost ถูกต้องนั่นหมายความว่า End จริงๆ&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;แล้วเราจะเขียน อย่างไรให้ชนะ หรือว่าทำเป็นด่านต่อไป&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;ผมจะกำหนดโดย var ละกัน&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;var string win;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;function bool CheckModifiedEndGame(PlayerReplicationInfo Winner, string Reason){&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;if(Reason == &quot;Lost&quot;){&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;                `log(&quot;Test&quot;); // แล้วลอง ดูที่ Log เอง&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt;  &lt;/span&gt;return false;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot;&gt; &lt;/span&gt;return true;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;event postbeginplay(){
 super.postbeginplay();
 SetTimer(3,false,nameOf(Ending));
}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;function Ending(){
 EndGame(none,&quot;Lost&quot;);
}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;function PerformEndGameHandling()
{
 //super.PerformEndGameHandling();
 RestartGame();
}&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-size: 14px; line-height: 21px; text-align: left; white-space: pre;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;function string GetNextMap(){&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;        if(win == &quot;winner&quot;){
       return &quot;2.udk&quot;;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;        }
}
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; text-align: left;&quot;&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;แล้วใน Defaultproperties เพิ่มไปว่า &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;win = &quot;winner&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;แล้วลองรันดูครับจะเห็นว่า มัน เปลี่ยนแผนที่จริงๆ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;แล้วลองเปลี่ยนเป็นแบบนี้ดู Win = &quot;Lose&quot;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;อ่าวแผนที่ไม่เปลี่ยน นั่นก็ถูกต้องแล้วครับ&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;อันนี้ผมยกตัวอย่างให้ หลังจากนั้นก็ขึ้นอยู่ที่คุณจะเอาไปใช้&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;สรุป&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;EndGame คือการจบเกมโดย จะส่งต่อไปให้ &lt;/span&gt;&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; text-align: -webkit-auto; white-space: pre;&quot;&gt;CheckModifiedEndGame&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; text-align: -webkit-auto; white-space: pre;&quot;&gt;CheckModifiedEndGame คือการ เช็คว่า ทำอะไรบ้างเราสามารถตั้งเงื่อนไขข้างในได้&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;PerformEndGameHandling คือการทำให้เกิดการ EndGame โดยจริงๆเป็น function สุดท้ายที่ทำงาน&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;RestartGame คือการ ไปสอบถามข้อมูลที่มีอยู่ใน &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;GetNextMap เมื่อได้จะทำการ Restart แล้วเริ่ม map ใหม่&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt;GetNextMap &lt;/span&gt;&lt;span style=&quot;background-color: white; font-family: &#39;Lucida Console&#39;, &#39;courier new&#39;, monospace; font-size: 14px; line-height: 21px; white-space: pre;&quot;&gt; คือการส่งค่า map โดยการ return ค่าเป็น String&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/3272153277009169682/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/3272153277009169682?isPopup=true' title='1 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/3272153277009169682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/3272153277009169682'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2011/12/3-game-start-game-over.html' title='บทที่ 3 Game Start &amp; Game Over'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjfh6cCuKtT7mwuSvgALjPNMxB0gzwv9YzElkgocUINcODEd-LZWnarrJNFShrZXKc0mienNlO7n6LxXd0ZOw_HIYzyB41s_wNxQyFAJlIEolGsQeVfnzL7Ptvu5PXrIJf7Zwe8ETlzmnXC/s72-c/TAB.PNG" height="72" width="72"/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-9209160805269273736.post-2425553984931370556</id><published>2011-12-24T05:19:00.001-08:00</published><updated>2013-11-02T03:51:28.026-07:00</updated><title type='text'>บทที่ 2 Gameinfo &amp; Pawn &amp; Controller</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
เรามาเริ่ม บทที่สองกันดีกว่า&lt;br /&gt;
จะขึ้นอีกวันนึงละ&lt;br /&gt;
&lt;br /&gt;
ผมจะมาเริ่มจาก class เดิมที่ผมเคยสร้างไว้นะครับ&lt;br /&gt;
นั่นคือ TestGame&lt;br /&gt;
&lt;br /&gt;
เรามาทวนความจำ โดย บทที่ 1.2 กันก่อนดีกว่า&lt;br /&gt;
&lt;a href=&quot;http://udkthai.blogspot.com/2011/12/12-begin-unreal-script.html&quot;&gt;บทที่ 1.2&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
หลังจากคุณไปทวนความจำเสร็จเรียบร้อย&lt;br /&gt;
มาเรามาเริ่มกัน&lt;br /&gt;
&lt;br /&gt;
ก่อนอื่น ผมจะลบ auto state ออกไป เหลือแค่ class กับ Default แบบนี้&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;Class TestGame Extends Gameinfo;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;DefaultProperties{&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
ผมก็จะสร้างอีก สอง class ไว้เผื่อก่อน&lt;br /&gt;
สร้างไฟล์ใน folder เดียวกับ TestGame นะจะได้ไม่เกิดปัญหา&lt;br /&gt;
&lt;br /&gt;
ผมจะสร้าง file ที่ชื่อว่า MyController และ MyPawn&lt;br /&gt;
สร้าง Class ตามชื่อไฟล์&lt;br /&gt;
&lt;br /&gt;
Class MyPawn Extends GamePawn;&lt;br /&gt;
&lt;br /&gt;
DefaultProperties{&lt;br /&gt;
}&lt;br /&gt;
//--------------------------------------------------&lt;br /&gt;
Class MyController Extends PlayerController;&lt;br /&gt;
&lt;br /&gt;
DefaultProperties{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
เรามาเริ่มที่ Class TestGame ก่อน&lt;br /&gt;
ผมจะเพิ่มตรง&amp;nbsp;&lt;span style=&quot;font-family: monospace; white-space: pre-wrap;&quot;&gt;DefaultProperties ข้างในผมจะใส่ว่า&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;PlayerControllerClass=class&#39;&lt;/span&gt;&lt;/span&gt; &lt;span style=&quot;font-family: monospace; white-space: pre-wrap;&quot;&gt;MyController&lt;/span&gt;&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&#39;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;**************** เจอกับตัวเลย UDK รุ่นใหม่ๆเดี๋ยวนี้ พางง ฮ่าๆๆ ปีกกาเปิด ผิดบรรทัด ทำเอา Default ไม่ทำงานเลยทีเดียว&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
DefaultProperties{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ให้เปลี่ยนเป็นแบบนี้&lt;br /&gt;
&lt;br /&gt;
DefaultProperties&lt;br /&gt;
{&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;************************************************************************&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;ต่อ&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;หลังจากนั้นก็จะได้&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
DefaultProperties&lt;br /&gt;
{&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; white-space: pre-wrap;&quot;&gt;PlayerControllerClass=class&#39;MyController&#39;&lt;/span&gt; &lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ตอนนี้ ได้ทำการเชื่อมกับ class&amp;nbsp;&lt;span style=&quot;font-family: monospace; white-space: pre-wrap;&quot;&gt;MyController แล้วเรียบร้อย&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; white-space: pre-wrap;&quot;&gt;ให้ใส่เพิ่มต่อไปว่า&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;ก็จะกลายเป็น&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
DefaultProperties&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;bRestartLevel = false;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;bDelayedStart=false;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; white-space: pre-wrap;&quot;&gt;PlayerControllerClass=class&#39;MyController&#39;&lt;/span&gt;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ทำไมถึงต้อง สองตัวนี้&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;bRestartLevel &amp;lt;&amp;lt; เริ่มด่านใหม่หรือไม่ ตอบ false ไม่ต้องอ่ะ จะอยู่ใน map นี้ เพราะถ้าไม่ใส่ยังไงมันก็ฟ้องว่า ด่านใหม่ตูอยู่ไหน!!&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;bDelayedStart &amp;lt;&amp;lt; สั่งให้มี Delay ภายหลังหรือไม่ false ไม่เกิดเลย&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;หลังจากนั้น ให้เติมอีกตัวนึง&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;DefaultPawnClass=class&#39;MyPawn&#39; &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;แล้วทีนี้ Unit ก็จะวิ่งได้ แต่ยังไม่ได้มี Model แต่ Controller รู้แล้วว่า เรามีการ Pawn เกิดขึ้นแล้วฉะนั้นพรุ้งนี้&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;เช้าผมจะมาต่อการใส่ Model ของ Pawn แล้วก็ตามด้วย Camera หลายๆรูปแบบ ครับ&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;สำหรับวันนี้ นอนก่อน เดี๋ยว พรุ้งนี้มาแก้ บทความแต่เช้าเลย&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
มาเรามาต่อกัน&lt;br /&gt;
&lt;br /&gt;
เราจะมาเข้า MyPawn กัน&amp;nbsp;ซึ่ง&amp;nbsp;พิมพ์จะพิมพ์ใน &amp;nbsp;Default&amp;nbsp;ว่า&lt;br /&gt;
Begin Object Class=SkeletalMeshComponent Name=Robot&lt;br /&gt;
&lt;br /&gt;
Begin Object Class คือการเริ่มเรียก Class ที่สำเร็จรูปอยู่แล้วมาใช้งาน โดยในนี้จะเป็น&lt;br /&gt;
SkeletalMeshComponant ซึ่งเป็น Class ในการดึง Mesh มาใช้งาน แล้วหลังจากนั้นผมตั้งชื่อว่า Robot&lt;br /&gt;
เพื่อจะเอาไป add ครับ&lt;br /&gt;
SkeletalMesh=SkeletalMesh&#39;หาไฟล์มาใส่&#39;&lt;br /&gt;
หลังจากนั้นผมจะทำการ กำหนด&amp;nbsp;SkeletalMesh ให้มันโดย เข้าไปเลือกใน Editor&lt;br /&gt;
//&amp;nbsp;&lt;a href=&quot;http://udkthai.blogspot.com/2011/12/copy-file-class.html&quot;&gt;เลือก File ใน Editor มาใช้งาน&lt;/a&gt;
&lt;br /&gt;
&lt;br /&gt;
SkeletalMesh=SkeletalMesh&#39;CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode&#39;&lt;br /&gt;
หลังจากนั้นให้&lt;br /&gt;
End object&lt;br /&gt;
แล้วก็&lt;br /&gt;
Mesh = Robot&lt;br /&gt;
Componant.add(Robot)&lt;br /&gt;
&lt;br /&gt;
Begin Object Class=SkeletalMeshComponent Name=Robot&lt;br /&gt;
SkeletalMesh=SkeletalMesh&#39;CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode&#39;&lt;br /&gt;
End Object&lt;br /&gt;
Mesh=Robot&amp;nbsp;;&lt;br /&gt;
Components.Add(Robot);&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7_ZCTwUJGjOrpZ3cX9UIvnPHXST973wBEr4-vUkjgbAYuGYIc4NkpqX4JFNoG2VRaM2E5iVsgP-Aic6XgoAMPZPLuhgqGBCTCbeZjEODJFUYC37xAcUQvfq3jZn9-IRHqTuoURfpUlHS8/s1600/M1.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;379&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7_ZCTwUJGjOrpZ3cX9UIvnPHXST973wBEr4-vUkjgbAYuGYIc4NkpqX4JFNoG2VRaM2E5iVsgP-Aic6XgoAMPZPLuhgqGBCTCbeZjEODJFUYC37xAcUQvfq3jZn9-IRHqTuoURfpUlHS8/s640/M1.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
ก็จะได้ Model ดังภาพ ดังนั้นเวลาวิ่งจะทื่อครับ ฉะนั้นผมยังไม่ได้ใส่ AnimTree หรือ Animset ครับ&lt;br /&gt;
เอาละ เราจะรู้ได้ไงว่าเราเอา Model มาจากไหน ก่อนอื่นเข้า Editor ครับ&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: -webkit-auto;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
Begin Object Class=DynamicLightEnvironmentComponent Name=env&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;bIsCharacterLightEnvironment=TRUE&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
End Object&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
ซึ่ง&amp;nbsp;bIsCharacterLightEnvironment ก็คือทำให้ Character ได้รับแสงจากสภาพแวดล้อม&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
แล้วก็ทำการ add&lt;br /&gt;
Components.Add(env)&lt;br /&gt;
กับ&lt;br /&gt;
LightEnvironment=env&lt;br /&gt;
เข้าไป&lt;br /&gt;
หลังจากนั้น เพิ่ม&amp;nbsp;LightEnvironment=env ใน object name robot ที่เราสร้างขึ้นไว้แล้ว&lt;br /&gt;
&lt;br /&gt;
===================================================================&lt;br /&gt;
&lt;br /&gt;
Class MyPawn Extends Pawn;&lt;br /&gt;
&lt;br /&gt;
DefaultProperties&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Begin Object Class=DynamicLightEnvironmentComponent Name=env&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;bIsCharacterLightEnvironment=TRUE&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;End Object&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Components.Add(env)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;LightEnvironment=env&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Begin Object Class=SkeletalMeshComponent Name=Robot&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SkeletalMesh=SkeletalMesh&#39;CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;LightEnvironment=env&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;End Object&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Mesh=Robot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Components.Add(Robot);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
====================================================================&lt;br /&gt;
&lt;br /&gt;
ก็จะได้ออกมา ดังรูป&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLT_-9PPHOfTw1tOrdM_6K_UWIllYxo0o-PRbGkTMsTzJ1jq-Xz1YpEzvfUmYXMKFwcmluqX-JNLN4bbc9v4ke6t3AP-gF-3V6Ih9qfaz2069rOtlRKY343ZmMod3K-IQNgw_7rNH2zJ7m/s1600/Light.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;353&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgLT_-9PPHOfTw1tOrdM_6K_UWIllYxo0o-PRbGkTMsTzJ1jq-Xz1YpEzvfUmYXMKFwcmluqX-JNLN4bbc9v4ke6t3AP-gF-3V6Ih9qfaz2069rOtlRKY343ZmMod3K-IQNgw_7rNH2zJ7m/s640/Light.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
ต่อไปผมจะมา add&lt;br /&gt;
การเคลื่อนไหวของ Model ก่อนละกันนะครับ&lt;br /&gt;
&lt;br /&gt;
เรามาหา animSet กันก่อน&lt;br /&gt;
ไปที่ Editor อีกครั้ง ของผมจะเลือก ติ๊ก animSet แล้วกด all assets ครับ&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNNs2kbA4T2SyG7buClnJCbXwUvpk8UgrQfrvvDozT84vyPuRqg1P42GN0eS6gccZD_0wZTobU1plDVnM2fomj5DmjuuYfwres0GAaBKZcw9s-25mJ3MIEKTxN_GPI3zirWPNLfQkfgji0/s1600/A.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;296&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhNNs2kbA4T2SyG7buClnJCbXwUvpk8UgrQfrvvDozT84vyPuRqg1P42GN0eS6gccZD_0wZTobU1plDVnM2fomj5DmjuuYfwres0GAaBKZcw9s-25mJ3MIEKTxN_GPI3zirWPNLfQkfgji0/s640/A.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
หลังจากนั้น ผมจะเลือก K_AnimHuman_BaseMale นะครับ เราสามารถ เข้าไปตรวจดูว่า มี skeletal Mesh&lt;br /&gt;
ตัวไหน ใช้งานร่วมกันได้&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2dIg3R0tbcr7WSwsB23vAWzyo8OA3MvXoiaEvzvnCL1MerhcDP2RXe2bKv0Dj8o6tJ6p8KZ3fF5kQ-bkGBzdfEmapXDPOLZps-7MnL7MRjrwYTvRvVccsXCYOu4IXUjZbe7oRwqxP8AVT/s1600/M2.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;390&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2dIg3R0tbcr7WSwsB23vAWzyo8OA3MvXoiaEvzvnCL1MerhcDP2RXe2bKv0Dj8o6tJ6p8KZ3fF5kQ-bkGBzdfEmapXDPOLZps-7MnL7MRjrwYTvRvVccsXCYOu4IXUjZbe7oRwqxP8AVT/s640/M2.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
ถ้ามันขยับเหมือนตัวต้นฉบับได้ก็แสดงว่า ตัวนั้นถูก กระทำโดย ActorX แล้วเรียบร้อยแล้วซึ่งก็หมายความ&lt;br /&gt;
ว่า Model นั้นถูกตั้งค่าการเคลื่อนไหวมาแล้วเรียบร้อย แล้วถูกจัดสันส่วนประกอบนั่นเอง&lt;br /&gt;
&lt;br /&gt;
ผมจะเลือกตัวนี้นะครับวิธีก็ใส่ animeset นะครับก็จะเหมือนกับการ ใส่ Mesh แต่ AnimSet จะเป็น array&lt;br /&gt;
ให้ใส่แบบนี้&lt;br /&gt;
&lt;br /&gt;
//&amp;nbsp;&lt;a href=&quot;http://udkthai.blogspot.com/2011/12/copy-file-class.html&quot;&gt;เลือก File ใน Editor มาใช้งาน&lt;/a&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AnimSets(0)=AnimSet&#39;CH_AnimHuman.Anims.K_AnimHuman_BaseMale&#39;&lt;br /&gt;
&lt;br /&gt;
หลังจากนั้นผมจะมาทำการใส่&lt;br /&gt;
Physicsasset&lt;br /&gt;
เรามาเข้าใจกันก่อนว่า Physicsasset นั่นคือการทำให้ Model มีค่าเป็น physics ที่ทาง UDK จัดสรรนั่นเอง&lt;br /&gt;
โดย ในที่นี้ Physics ตัวนี้จะทำงานคู่กับ Ragdoll เมื่อการเกิดทำให้เกิด Ragdoll จะทำให้ Physicsasset ก็จะเริ่มทำงาน&lt;br /&gt;
&lt;br /&gt;
ตัวอย่าง &amp;nbsp;Ragdoll&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;344&quot; src=&quot;http://www.youtube.com/embed/QZD-O54FbMU?fs=1&quot; style=&quot;font-family: Georgia, serif; font-size: 16px; text-align: left;&quot; width=&quot;459&quot;&gt;&lt;/iframe&gt; &lt;br /&gt;
Ragdoll คือ Physics อย่างหนึ่งทาง Computer ซึ่งจะเป็น physics ที่เคลื่อนไหวไปในทิศทาง การ falling หรือทางแรงโน้นถ่วงโลก&lt;br /&gt;
&lt;br /&gt;
ตัวอย่าง&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
//&amp;nbsp;&lt;a href=&quot;http://udkthai.blogspot.com/2011/12/copy-file-class.html&quot;&gt;เลือก File ใน Editor มาใช้งาน&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PhysicsAsset=PhysicsAsset&#39;CH_AnimCorrupt.Mesh.SK_CH_Corrupt_Male_Physics&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
วิธีการหาก็เหมือนกับข้างบนเปะ เลยครับ แต่ติ๊กจาก animation sets ให้ติ๊กเป็น All นะครับ&lt;br /&gt;
หลังจากได้แล้ว ที่ขาดไม่ได้เลยคือ&lt;br /&gt;
&lt;br /&gt;
AnimTree ซึ่งตัวนี้ ช่วยให้เราไม่ต้องสร้าง script การเคลื่อนไหวในรูปแบบต่างๆ ของ Unit ได้&lt;br /&gt;
เช่น การ moveing falling&amp;nbsp;swimming jumping อื่นๆอีก move แกนไหน หันหน้า หันตัว ได้อีกตัว แหงนหน้า&lt;br /&gt;
ไปทางไหนได้อีกตัว ตัวนี้ ใน Editor สดวกมากๆ&lt;br /&gt;
&lt;br /&gt;
ฉะนั้นวิธีหาก็เหมือนเดิมครับ แต่ใน Object Type มันไม่มีให้ติ๊ก ให้เราพิมพ์ช่องค้นหา ก็คือ AnimTree&lt;br /&gt;
ในที่นี้ผมจะเลือก&amp;nbsp;AT_CH_Human เนื่องจาก เรามาดูกันต้องดูภาพตาม&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgieAcHoOcJCkD9X1nntzIWUgqtdWSJbGWzrYCAPYKPbyqFZODHWjPjfUuiT1NzxCXPe0vzJ-ktEgaQ8SFy4EL-bH9O0JTG3FKhErfizTxFT61BDCLPxjam3khUmwuBc1QebdBWlbN2FkHr/s1600/A3.PNG&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;336&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgieAcHoOcJCkD9X1nntzIWUgqtdWSJbGWzrYCAPYKPbyqFZODHWjPjfUuiT1NzxCXPe0vzJ-ktEgaQ8SFy4EL-bH9O0JTG3FKhErfizTxFT61BDCLPxjam3khUmwuBc1QebdBWlbN2FkHr/s640/A3.PNG&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
นั่นก็คือ ใน&amp;nbsp;AT_CH_Human ของ AnimTree เขา set ไว้ให้หมดแล้วผมจึงใช้ตัวนี้แทนครับ&lt;br /&gt;
หลังจากนั้น&amp;nbsp;ก็ใส่&amp;nbsp;AT_CH_Human เหมือนเดิม&lt;br /&gt;
&lt;br /&gt;
ตัวอย่าง&lt;br /&gt;
&lt;br /&gt;
//&amp;nbsp;&lt;a href=&quot;http://udkthai.blogspot.com/2011/12/copy-file-class.html&quot;&gt;เลือก File ใน Editor มาใช้งาน&lt;/a&gt;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AnimTreeTemplate=AnimTree&#39;CH_AnimHuman_Tree.AT_CH_Human&#39;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
มาเรามาลองดู code ทั้งหมดกัน&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Class MyPawn Extends Pawn;&lt;br /&gt;
&lt;br /&gt;
DefaultProperties&lt;br /&gt;
{&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Begin Object Class=DynamicLightEnvironmentComponent Name=env&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;bIsCharacterLightEnvironment=TRUE&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;End Object&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Components.Add(env)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;LightEnvironment=env&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Begin Object Class=SkeletalMeshComponent Name=Robot&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SkeletalMesh=SkeletalMesh&#39;CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;LightEnvironment=env&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AnimSets(0)=AnimSet&#39;CH_AnimHuman.Anims.K_AnimHuman_BaseMale&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AnimTreeTemplate=AnimTree&#39;CH_AnimHuman_Tree.AT_CH_Human&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SkeletalMesh=SkeletalMesh&#39;CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PhysicsAsset=PhysicsAsset&#39;CH_AnimCorrupt.Mesh.SK_CH_Corrupt_Male_Physics&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;End Object&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Mesh=Robot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Components.Add(Robot);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
อั่นแน่ะ เคลื่อนไหวได้แล้ว&lt;br /&gt;
&lt;br /&gt;
เดี๋ยวเรามาเล่น เสียงกันเพิ่มเติมและการปรับกล้องใน Class Pawn&lt;br /&gt;
&lt;br /&gt;
&lt;iframe allowfullscreen=&quot;&quot; frameborder=&quot;0&quot; height=&quot;344&quot; src=&quot;http://www.youtube.com/embed/rhwa6uhrlAw?fs=1&quot; style=&quot;font-family: Georgia, serif; font-size: 16px; text-align: left;&quot; width=&quot;459&quot;&gt;&lt;/iframe&gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
มาต่อโดยกล้อง จาก Pawn ครับ&lt;br /&gt;
&lt;br /&gt;
เราจะใช้ function ที่ชื่อว่า Calc Camera&lt;br /&gt;
&lt;br /&gt;
โดยการเขียน simulated function เพื่อแทรกการทำงาน ก่อนหน้านี้&lt;br /&gt;
โดย วิธีการเขียน ก็คือ&lt;br /&gt;
&lt;br /&gt;
Class MyPawn Extends GamePawn;&lt;br /&gt;
&amp;lt;&amp;lt; &lt;span style=&quot;color: red;&quot;&gt;แทรกตรงนี้&lt;/span&gt;&lt;br /&gt;
DefaultProperties&lt;br /&gt;
{&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Begin Object Class=DynamicLightEnvironmentComponent Name=env&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;  &lt;/span&gt;bIsCharacterLightEnvironment=TRUE&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;End Object&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Components.Add(env)&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;LightEnvironment=env&lt;br /&gt;
&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Begin Object Class=SkeletalMeshComponent Name=Robot&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SkeletalMesh=SkeletalMesh&#39;CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;LightEnvironment=env&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AnimSets(0)=AnimSet&#39;CH_AnimHuman.Anims.K_AnimHuman_BaseMale&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;AnimTreeTemplate=AnimTree&#39;CH_AnimHuman_Tree.AT_CH_Human&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;SkeletalMesh=SkeletalMesh&#39;CH_LIAM_Cathode.Mesh.SK_CH_LIAM_Cathode&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;PhysicsAsset=PhysicsAsset&#39;CH_AnimCorrupt.Mesh.SK_CH_Corrupt_Male_Physics&#39;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;End Object&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Mesh=Robot;&lt;br /&gt;
&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Components.Add(Robot);&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ผม ก็สร้าง function ขึ้นมาชื่อว่า&lt;br /&gt;
&lt;br /&gt;
simulated function &lt;span style=&quot;color: red;&quot;&gt;bool &lt;/span&gt;CalcCamera(float Time,out vector loc,out rotator rot,out float fov){&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
function นี้จะเป็นการ ตั้งค่ากล้องเริ่มต้นนะครับ ส่วนใหญ่จะใช้เป็นตัวการที่ใช้ตั้งค่ากล้องเริ่ม&lt;br /&gt;
การ Pawn นั่นเองLocation คือพื้นที่นั่นเอง&lt;br /&gt;
ส่วนถ้าเราใช้ใน Class Pawn นั้นไม่ต้องประกาศ this หรือ Pawn อีกรอบเลยครับ หรือไม่ต้องประกาศ MyPawn แต่อย่างใด&lt;br /&gt;
ให้เราใช้ Location ไปเลยโดด&amp;nbsp;เรามาดูด้าน Parameter กันดีกว่า loc นั้น ผมได้สร้าง เอาไว้เพื่อ&lt;br /&gt;
ส่ง ค่า location ของกล้องออกไปทำงานใน class camera นั่นเอง และ rotator ด้วยเช่นกัน&lt;br /&gt;
เพราะฉะนั้น เรามาดูตัวอย่างเลยดีกว่า&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
simulated function&amp;nbsp;bool&amp;nbsp;CalcCamera(float Time,out vector loc,out rotator rot,out float fov){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loc = vect(0,0,200);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return bool;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
ท่านจะได้เห็นแต่ภาพมืดๆ นั่นก็เพราะว่า loc ผม fix ไว้ตายตัว คือ พื้นที่ แกน X = 0 Y = 0 Z = 200&lt;br /&gt;
vect นั่นจะเป็นตัวจะเป็นตัวจำกัดข้างใน vect จะ return ค่าเป็น vector&lt;br /&gt;
vector คือ ตำแหน่งของ 3D นั่นเอง โดย vector จะมีแกน XYZ&lt;br /&gt;
&lt;br /&gt;
แล้ว Rotator จะมี 3 ตัวจะคล้ายๆกับ XYZ โดย ดูได้จากรูป จะมี Roll Pitch Yawข&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ครับ ดังนั้น ถ้าใครเรียน sin cos จะรู้ดี ส่วนถ้าใครไม่ได้เรียน จะมี ค่า สูงสุด คือ 16000 ต่ำสุดคือ&lt;br /&gt;
0 และ ค่ากลับ คือ -16000 ครับ&lt;br /&gt;
&lt;br /&gt;
สามารถ เช็คได้&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
simulated function&amp;nbsp;bool&amp;nbsp;CalcCamera(float Time,out vector loc,out rotator rot,out float fov){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;loc = location;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rot&amp;nbsp;= rotation&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;`log(rot.pitch);&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
แล้วลองหมุนหน้าจอดู แล้วไปดูที่ Log ใน command ดูมาอธิบายขยายความนิดนึง&lt;br /&gt;
&lt;br /&gt;
Controll.rotation ก็คือส่วนที่เราบังคับนั้นเอง ส่วนประกอบของ Controll ก็คือ Input เดี๋ยวเรามาเจาะ&lt;br /&gt;
ลึกกันอีกทีครับ&lt;br /&gt;
&lt;br /&gt;
วิธี fix ทำให้กล้องเป็น camera แบบ ในเกม Warcraft3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
simulated function bool CalcCamera(float Time,out vector loc,out rotator rot,out float fov){&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loc = location;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rot = rotation; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // Line 5&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; rot.pitch = -12050;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; loc.Z = 500;&lt;br /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return true;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPw7u_XcuVA_AbxSvLNCwhVZ2FpPC2eflDUG0mIG1dR1b9vtoQ__Ff57uF1geIyM7L3uUgRSbXQDYjvO2R-uFpKSUvYxNLIBvLgV64n-CMINjzHTdEnQXap5nOn3dzkNCJMdURi1LYqDWv/s1600/999.PNG&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;190&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgPw7u_XcuVA_AbxSvLNCwhVZ2FpPC2eflDUG0mIG1dR1b9vtoQ__Ff57uF1geIyM7L3uUgRSbXQDYjvO2R-uFpKSUvYxNLIBvLgV64n-CMINjzHTdEnQXap5nOn3dzkNCJMdURi1LYqDWv/s320/999.PNG&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ก็จะได้มุมมองแบบ ในรูปออกมา สูงขึ้น ใช้เม้าส์หมุน ซ้ายขวาได้แต่หมุนขึ้นหมุนลงไม่ได้ครับ&lt;br /&gt;
เพราะผม fix pitch ไว้แล้วครับ แล้วมุมสูงขึ้นก็มาจาก แกน Z ผม ตั้งค่าไว้ที่ 500 ครับ&lt;br /&gt;
ลองเล่นดูละกันครับ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
สรุป&lt;br /&gt;
&lt;br /&gt;
CalcCamera : เป็น function ที่กำหนดการเริ่มต้นค่าของ กล้อง player ที่ติดต่อ กับการ pawn ครับ&lt;br /&gt;
&lt;br /&gt;
SkeletalMeshComponent&amp;nbsp; : เป็น class ที่กำหนด SkeletalMesh ครับส่วนใหญ่จะใช้ในการแสดงรูปร่างของ object&lt;br /&gt;
&lt;br /&gt;
DynamicLightEnvironmentComponent&amp;nbsp; : เป็นการกำหนดด้านแสงครับ โดย&amp;nbsp;SkeletalMeshComponent&amp;nbsp;&amp;nbsp;มักจะดึงไปใช้ครับเพื่อให้ shadow อะไรพวกนี้ทั้งหลายแหล่ ที่เรา Render ออกมาได้แสดงผลจริงๆครับ&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;bRestartLevel : เป็นการกำหนดว่าเราต้องการเริ่มต้นหรือไม่ โดย ถ้า เป็น false คือยังไม่ได้เริ่มต้น ให้เลือก false นะครับ&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace;&quot;&gt;&lt;span style=&quot;white-space: pre-wrap;&quot;&gt;bDelayedStart : เป็นการกำหนดว่าเราต้องการเกิดเลยหรือไม่ True เกิดเลย false ยังจนกว่าจะคลิก&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: monospace; white-space: pre-wrap;&quot;&gt;PlayerControllerClass : เป็นการกำหนด class Controller การเชื่อมต่อ Class PlayerController นั่นเองครับ&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://udkthai.blogspot.com/feeds/2425553984931370556/comments/default' title='ส่งความคิดเห็น'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment/fullpage/post/9209160805269273736/2425553984931370556?isPopup=true' title='3 ความคิดเห็น'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/2425553984931370556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/9209160805269273736/posts/default/2425553984931370556'/><link rel='alternate' type='text/html' href='http://udkthai.blogspot.com/2011/12/2-gameinfo-pawn-controller.html' title='บทที่ 2 Gameinfo &amp; Pawn &amp; Controller'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/05725491590127012713</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7_ZCTwUJGjOrpZ3cX9UIvnPHXST973wBEr4-vUkjgbAYuGYIc4NkpqX4JFNoG2VRaM2E5iVsgP-Aic6XgoAMPZPLuhgqGBCTCbeZjEODJFUYC37xAcUQvfq3jZn9-IRHqTuoURfpUlHS8/s72-c/M1.PNG" height="72" width="72"/><thr:total>3</thr:total></entry></feed>